Class: APIMatchers::Headers::BeXML

Inherits:
Base
  • Object
show all
Defined in:
lib/api_matchers/headers/be_xml.rb

Instance Attribute Summary

Attributes inherited from Base

#setup

Instance Method Summary collapse

Methods inherited from Base

#content_type_response, #initialize, #matches?

Constructor Details

This class inherits a constructor from APIMatchers::Headers::Base

Instance Method Details

#expected_content_typeObject



4
5
6
# File 'lib/api_matchers/headers/be_xml.rb', line 4

def expected_content_type
  'application/xml; charset=utf-8'
end

#failure_messageObject Also known as: failure_message_for_should



8
9
10
# File 'lib/api_matchers/headers/be_xml.rb', line 8

def failure_message
  %Q{expected a XML response with '#{expected_content_type}'. Got: '#{content_type_response}'.}
end

#failure_message_when_negatedObject Also known as: failure_message_for_should_not



12
13
14
# File 'lib/api_matchers/headers/be_xml.rb', line 12

def failure_message_when_negated
  %Q{expected to not be a XML response. Got: '#{expected_content_type}'.}
end