Module: RSpecApi::Expectations::Response::Headers::ContentType
- Defined in:
- lib/rspec-api/expectations/headers/content_type.rb
Instance Method Summary collapse
Instance Method Details
#expect_content_type(response, expectations = {}) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/rspec-api/expectations/headers/content_type.rb', line 8 def expect_content_type(response, expectations = {}) include RSpecApi::Matchers if should_check_content_type(response, expectations) it { expect(response).to have_content_type expectations[:type] } end end |