Skip to content

Commit

Permalink
Merge pull request #19 from ThadeuBrito/patch-1
Browse files Browse the repository at this point in the history
Refactor content_type_response
  • Loading branch information
tomas-stefano committed Aug 27, 2014
2 parents 0c96537 + fd2885a commit 2c42270
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/api_matchers/headers/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ def matches?(actual)
def content_type_response
if @setup.header_method.present? and @setup.header_content_type_key.present?
headers = @actual.send(@setup.header_method)
if headers.present?
headers[@setup.header_content_type_key] || headers
end
headers[@setup.header_content_type_key] || headers if headers.present?
else
@actual
end
Expand Down

0 comments on commit 2c42270

Please sign in to comment.