Class: RSpec::Fakes::ReceivedCriteria

Inherits:
Object
  • Object
show all
Defined in:
lib/core/received_criteria.rb

Instance Method Summary collapse

Constructor Details

#initialize(the_call) ⇒ ReceivedCriteria

Returns a new instance of ReceivedCriteria.



4
5
6
# File 'lib/core/received_criteria.rb', line 4

def initialize(the_call)
  @the_call = the_call
end

Instance Method Details

#is_satisfied_by(*args) ⇒ Object



8
9
10
11
# File 'lib/core/received_criteria.rb', line 8

def is_satisfied_by(*args)
  return false if @the_call == nil
  return args.count == 0 ? true : @the_call.called_with(*args) != nil
end