Sha256: ca730127696ac5dadd03aee73baa023cb0a11a7ea4e20124cba097c8fead86cd

Contents?: true

Size: 771 Bytes

Versions: 33

Compression:

Stored size: 771 Bytes

Contents

require 'pact/consumer/mock_service/mock_service_administration_endpoint'

module Pact
  module Consumer

    class MissingInteractionsGet < MockServiceAdministrationEndpoint
      include RackRequestHelper

      def initialize name, logger, interaction_list
        super name, logger
        @interaction_list = interaction_list
      end

      def request_path
        '/number_of_missing_interactions'
      end

      def request_method
        'GET'
      end

      def respond env
        number_of_missing_interactions = @interaction_list.missing_interactions.size
        logger.info "Number of missing interactions for mock \"#{name}\" = #{number_of_missing_interactions}"
        [200, {}, ["#{number_of_missing_interactions}"]]
      end

    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
pact-1.0.26 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.25 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.24 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.23 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.22 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.21 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.20 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.19 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.18 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.15 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.13 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.12 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.11 lib/pact/consumer/mock_service/missing_interactions_get.rb