Class: SuperDiff::RSpec::OperationalSequencers::HashIncluding
- Inherits:
-
OperationalSequencers::Hash
- Object
- OperationalSequencers::Base
- OperationalSequencers::Hash
- SuperDiff::RSpec::OperationalSequencers::HashIncluding
- Defined in:
- lib/super_diff/rspec/operational_sequencers/hash_including.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(expected:, **rest) ⇒ HashIncluding
constructor
A new instance of HashIncluding.
Methods inherited from OperationalSequencers::Base
Constructor Details
#initialize(expected:, **rest) ⇒ HashIncluding
Returns a new instance of HashIncluding.
10 11 12 13 14 |
# File 'lib/super_diff/rspec/operational_sequencers/hash_including.rb', line 10 def initialize(expected:, **rest) super @expected = expected.expecteds.first end |
Class Method Details
.applies_to?(expected, actual) ⇒ Boolean
5 6 7 8 |
# File 'lib/super_diff/rspec/operational_sequencers/hash_including.rb', line 5 def self.applies_to?(expected, actual) SuperDiff::RSpec.a_hash_including_something?(expected) && actual.is_a?(::Hash) end |