Sha256: 4828f28bd5f55d67f05c3949d168770cb13881bdf8549376c240153ff937ef0e
Contents?: true
Size: 672 Bytes
Versions: 1
Compression:
Stored size: 672 Bytes
Contents
require 'pact/consumer/mock_service/rack_request_helper' module Pact module Consumer class InteractionDelete include RackRequestHelper def initialize name, logger, interaction_list @name = name @logger = logger @interaction_list = interaction_list end def match? env env['REQUEST_PATH'].start_with?('/interactions') && env['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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pact-1.0.10 | lib/pact/consumer/mock_service/interaction_delete.rb |