Module: RSpecApi::Expectations::Response
- Included in:
- RSpecApi::Expectations
- Defined in:
- lib/rspec-api/expectations/body.rb,
lib/rspec-api/expectations/custom.rb,
lib/rspec-api/expectations/status.rb,
lib/rspec-api/expectations/headers.rb,
lib/rspec-api/expectations/response.rb,
lib/rspec-api/expectations/body/sort.rb,
lib/rspec-api/expectations/body/jsonp.rb,
lib/rspec-api/expectations/body/filter.rb,
lib/rspec-api/expectations/status/code.rb,
lib/rspec-api/expectations/body/attributes.rb,
lib/rspec-api/expectations/body/collection.rb,
lib/rspec-api/expectations/headers/page_links.rb,
lib/rspec-api/expectations/headers/content_type.rb
Defined Under Namespace
Modules: Body, Custom, Headers, Status
Instance Method Summary collapse
Methods included from Custom
Methods included from Body
Methods included from Headers
Methods included from Status
Instance Method Details
#expect_response(response, expectations, prefix_params = nil, &block) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/rspec-api/expectations/response.rb', line 16 def expect_response(response, expectations, prefix_params=nil, &block) expect_status response, expectations.slice(*on_status) expect_headers response, expectations.slice(*on_headers) expect_body response, expectations.slice(*on_body) expect_custom response, prefix_params, &block if block_given? end |