Module: RSpecApi::Matchers::Attributes
- Included in:
- RSpecApi::Matchers
- Defined in:
- lib/rspec-api/matchers/attributes/matcher.rb,
lib/rspec-api/matchers/attributes/have_attributes.rb
Defined Under Namespace
Classes: Matcher
Instance Method Summary collapse
-
#have_attributes(*attributes) ⇒ Object
Passes if the object includes the expected attributes in the body.
Instance Method Details
#have_attributes(*attributes) ⇒ Object
Passes if the object includes the expected attributes in the body.
The method works only if the object is a JSON object or a collection of JSON objects; in the latter case all the objects need to include the expected attributes for the expectation to pass.
28 29 30 |
# File 'lib/rspec-api/matchers/attributes/have_attributes.rb', line 28 def have_attributes(*attributes) RSpecApi::Matchers::Attributes::Matcher.new *attributes end |