Sha256: 5816dfc9d7c29c2263ac1d09a233d201926c122c73b92f1787181a27eb14ef26

Contents?: true

Size: 485 Bytes

Versions: 4

Compression:

Stored size: 485 Bytes

Contents

module Pact
  module Consumer
    class VerifiedInteractions < Array

      def << interaction
        unless find_matching_description_and_provider_state interaction
          super
        end
      end

      def find_matching_description_and_provider_state interaction
        find do |candidate_interaction|
          candidate_interaction.matches_criteria?(description: interaction.description, provider_state: interaction.provider_state)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pact-mock_service-0.2.4 lib/pact/consumer/mock_service/verified_interactions.rb
pact-mock_service-0.2.3 lib/pact/consumer/mock_service/verified_interactions.rb
pact-mock_service-0.2.3.pre.rc2 lib/pact/consumer/mock_service/verified_interactions.rb
pact-mock_service-0.2.3.pre.rc1 lib/pact/consumer/mock_service/verified_interactions.rb