Sha256: f6716dd0bdd812b04d67ae7c4570b6d5f8673c8dd08b32c6ccdf6c9fef832f28

Contents?: true

Size: 494 Bytes

Versions: 12

Compression:

Stored size: 494 Bytes

Contents

module Fakes
  module RSpec
    class ReceivedOccurencesCriteria
      def initialize(received_criteria,the_call,occurence)
        @received_criteria = received_criteria
        @the_call = the_call
        @occurence = occurence
      end

      def is_satisfied_by(*args)
        return @received_criteria.is_satisfied_by(*args) &&
          @occurence.is_satisfied_by((args.count == 0 ? @the_call.total_times_called : @the_call.called_with(*args).times_called))
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
fakes-rspec-1.0.4 lib/fakes_rspec/received_occurances_criteria.rb
fakes-rspec-1.0.2 lib/core/received_occurances_criteria.rb
fakes-rspec-1.0.0 lib/core/received_occurances_criteria.rb
fakes-rspec-0.4.1 lib/core/received_occurances_criteria.rb
fakes-rspec-0.4.0 lib/core/received_occurances_criteria.rb
fakes-rspec-0.3.8 lib/core/received_occurances_criteria.rb
fakes-rspec-0.3.2 lib/core/received_occurances_criteria.rb
fakes-rspec-0.3.1 lib/core/received_occurances_criteria.rb
fakes-rspec-0.1.3 lib/core/received_occurances_criteria.rb
fakes-rspec-0.1.2 lib/core/received_occurances_criteria.rb
fakes-rspec-0.1.1 lib/core/received_occurances_criteria.rb
fakes-rspec-0.1.0 lib/core/received_occurances_criteria.rb