Sha256: 95be9b9dd93cdc3040779ab23b6e1b63d62495139239db2ae3460251e42173c8

Contents?: true

Size: 775 Bytes

Versions: 44

Compression:

Stored size: 775 Bytes

Contents

require 'pact/consumer/mock_service/rack_request_helper'
require 'pact/consumer/mock_service/mock_service_administration_endpoint'

module Pact
  module Consumer

    class InteractionDelete < MockServiceAdministrationEndpoint

      include RackRequestHelper

      attr_accessor :interaction_list

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

      def request_path
        '/interactions'
      end

      def request_method
        'DELETE'
      end

      def respond env
        interaction_list.clear
        logger.info "Cleared interactions before example \"#{params_hash(env)['example_description']}\""
        [200, {}, ['Deleted interactions']]
      end
    end
  end
end

Version data entries

44 entries across 44 versions & 2 rubygems

Version Path
pact-mock_service-0.2.2 lib/pact/consumer/mock_service/interaction_delete.rb
pact-mock_service-0.2.1 lib/pact/consumer/mock_service/interaction_delete.rb
pact-mock_service-0.2.0 lib/pact/consumer/mock_service/interaction_delete.rb
pact-mock_service-0.1.0 lib/pact/consumer/mock_service/interaction_delete.rb
pact-mock_service-0.0.1 lib/pact/consumer/mock_service/interaction_delete.rb
pact-1.3.3 lib/pact/consumer/mock_service/interaction_delete.rb
pact-1.3.2 lib/pact/consumer/mock_service/interaction_delete.rb
pact-1.3.1 lib/pact/consumer/mock_service/interaction_delete.rb
pact-1.3.0 lib/pact/consumer/mock_service/interaction_delete.rb
pact-1.2.1.rc2 lib/pact/consumer/mock_service/interaction_delete.rb
pact-1.2.1.rc1 lib/pact/consumer/mock_service/interaction_delete.rb
pact-1.1.1 lib/pact/consumer/mock_service/interaction_delete.rb
pact-1.1.0 lib/pact/consumer/mock_service/interaction_delete.rb
pact-1.1.0.rc5 lib/pact/consumer/mock_service/interaction_delete.rb
pact-1.1.0.rc4 lib/pact/consumer/mock_service/interaction_delete.rb
pact-1.1.0.rc3 lib/pact/consumer/mock_service/interaction_delete.rb
pact-1.0.39 lib/pact/consumer/mock_service/interaction_delete.rb
pact-1.1.0.rc2 lib/pact/consumer/mock_service/interaction_delete.rb
pact-1.0.38 lib/pact/consumer/mock_service/interaction_delete.rb
pact-1.1.0.rc1 lib/pact/consumer/mock_service/interaction_delete.rb