Method: RSpec::Matchers#have_attributes
- Defined in:
- lib/rspec/matchers.rb
#have_attributes(expected) ⇒ Object Also known as: an_object_having_attributes, having_attributes
Note:
It will fail if actual doesn't respond to any of the expected attributes.
Passes if actual's attribute values match the expected attributes hash. This works no matter how you define your attribute readers.
616 617 618 |
# File 'lib/rspec/matchers.rb', line 616 def have_attributes(expected) BuiltIn::HaveAttributes.new(expected) end |