Sha256: f57bfb3b4cb128fb914922ac2d56665f5c94afe6bc8f6dd7eaf412dffcf1fd04

Contents?: true

Size: 554 Bytes

Versions: 4

Compression:

Stored size: 554 Bytes

Contents

module DevelopWithPassion
  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
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
developwithpassion_fakes-rspec-0.0.8 lib/core/received_occurances_criteria.rb
developwithpassion_fakes-rspec-0.0.7 lib/core/received_occurances_criteria.rb
developwithpassion_fakes-rspec-0.0.6 lib/core/received_occurances_criteria.rb
developwithpassion_fakes-rspec-0.0.5 lib/core/received_occurances_criteria.rb