Class: Clowne::RSpec::Matchers::CloneAssociations
- Inherits:
-
RSpec::Matchers::BuiltIn::ContainExactly
- Object
- RSpec::Matchers::BuiltIn::ContainExactly
- Clowne::RSpec::Matchers::CloneAssociations
- Includes:
- Helpers
- Defined in:
- lib/clowne/rspec/clone_associations.rb
Overview
‘clone_associations` matcher is just an extension of `contain_exactly` matcher
Instance Attribute Summary
Attributes included from Helpers
Instance Method Summary collapse
Methods included from Helpers
#matches?, #non_cloner_message, #plan, #with_traits
Instance Method Details
#convert_actual_to_an_array ⇒ Object
10 11 12 13 14 |
# File 'lib/clowne/rspec/clone_associations.rb', line 10 def convert_actual_to_an_array @actual = plan.declarations .select { |key, _| key == :association } .map { |_, decl| decl.name } end |