class Fakes::RSpec::ReceivedOccurrencesCriteria

Public Class Methods

new(received_criteria,the_call,occurrence) click to toggle source
# File lib/fakes_rspec/received_occurrences_criteria.rb, line 4
def initialize(received_criteria,the_call,occurrence)
  @received_criteria = received_criteria
  @the_call = the_call
  @occurrence = occurrence
end

Public Instance Methods

is_satisfied_by(*args) click to toggle source
# File lib/fakes_rspec/received_occurrences_criteria.rb, line 10
def is_satisfied_by(*args)
  return @received_criteria.is_satisfied_by(*args) &&
    @occurrence.is_satisfied_by((args.count == 0 ? @the_call.total_times_called : @the_call.called_with(*args).times_called))
end