Class: DevelopWithPassion::Fakes::RSpec::ReceivedCriteria
- Inherits:
-
Object
- Object
- DevelopWithPassion::Fakes::RSpec::ReceivedCriteria
- Defined in:
- lib/core/received_criteria.rb
Instance Method Summary collapse
-
#initialize(the_call) ⇒ ReceivedCriteria
constructor
A new instance of ReceivedCriteria.
- #is_satisfied_by(*args) ⇒ Object
Constructor Details
#initialize(the_call) ⇒ ReceivedCriteria
Returns a new instance of ReceivedCriteria.
5 6 7 |
# File 'lib/core/received_criteria.rb', line 5 def initialize(the_call) @the_call = the_call end |
Instance Method Details
#is_satisfied_by(*args) ⇒ Object
9 10 11 12 |
# File 'lib/core/received_criteria.rb', line 9 def is_satisfied_by(*args) return false if @the_call == nil return args.count == 0 ? true : @the_call.called_with(*args) != nil end |