Class: RSpec::Mocks::AnyInstance::Chain
- Inherits:
-
Object
- Object
- RSpec::Mocks::AnyInstance::Chain
show all
- Defined in:
- lib/rspec/mocks/any_instance.rb
Instance Method Summary
collapse
Instance Method Details
#constrained_to_any_of?(*constraints) ⇒ Boolean
24
25
26
27
28
29
30
|
# File 'lib/rspec/mocks/any_instance.rb', line 24
def constrained_to_any_of?(*constraints)
constraints.any? do |constraint|
messages.any? do |message|
message.first.first == constraint
end
end
end
|
#playback!(instance) ⇒ Object
18
19
20
21
22
|
# File 'lib/rspec/mocks/any_instance.rb', line 18
def playback!(instance)
messages.inject(instance) do |instance, message|
instance.send(*message.first, &message.last)
end
end
|