Sha256: 44e81f0ed96878675508ed7a6c3f05463b7cf74eba8c7dce8402baeb073b2414
Contents?: true
Size: 666 Bytes
Versions: 2
Compression:
Stored size: 666 Bytes
Contents
module APIMatchers module Headers class BeJSON < Base def expected_content_type 'application/json; charset=utf-8' end def failure_message %Q{expected a JSON response with '#{expected_content_type}'. Got: '#{content_type_response}'.} end def failure_message_when_negated %Q{expected to not be a JSON response. Got: '#{expected_content_type}'.} end def description "be in JSON" end # RSpec 2 compatibility: alias_method :failure_message_for_should, :failure_message alias_method :failure_message_for_should_not, :failure_message_when_negated end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
api_matchers-0.6.2 | lib/api_matchers/headers/be_json.rb |
api_matchers-0.6.1 | lib/api_matchers/headers/be_json.rb |