Module: RSpecApi::Matchers::Response

Included in:
RSpecApi::Matchers
Defined in:
lib/rspec-api/matchers/response/matcher.rb,
lib/rspec-api/matchers/response/be_a_valid_response.rb

Defined Under Namespace

Classes: Matcher

Instance Method Summary collapse

Instance Method Details

#be_a_valid_responseObject

Passes if response is present

For more examples check be_a_valid_response_spec.rb.

Examples:


# Passes if the response has a status
response = OpenStruct.new status: 100
expect(response).to be_a_valid_response


15
16
17
# File 'lib/rspec-api/matchers/response/be_a_valid_response.rb', line 15

def be_a_valid_response
  RSpecApi::Matchers::Response::Matcher.new
end