module RSpecApi::Expectations::Response::Status

Creates an example group for expectations on the HTTP status code of the last API request and runs it to verify that it matches status.

Public Instance Methods

expect_status(response, expectations = {}) click to toggle source
# File lib/rspec-api/expectations/status.rb, line 9
def expect_status(response, expectations = {})
  context 'responds with a status code that' do
    extend Code

    expect_status_code response, expectations
  end if expectations.any?
end