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.1.1 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.1.0 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.1.0.rc5 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.1.0.rc4 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.1.0.rc3 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.39 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.1.0.rc2 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.38 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.1.0.rc1 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.37 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.36 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.35 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.34 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.33 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.32 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.31 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.30 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.29 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.28 lib/pact/consumer/mock_service/missing_interactions_get.rb
pact-1.0.27 lib/pact/consumer/mock_service/missing_interactions_get.rb