Sha256: c3418cf3e465c99687dfa24fb38449a475a7cb9cdf2dfae969f19d25c3fb3651
Contents?: true
Size: 878 Bytes
Versions: 40
Compression:
Stored size: 878 Bytes
Contents
require 'net/http' require 'pact/reification' require 'pact/consumer_contract/interaction' module Pact module Consumer class InteractionBuilder attr_reader :interaction def initialize @interaction = Interaction.new end def upon_receiving description @interaction.description = description self end def given provider_state @interaction.provider_state = provider_state.nil? ? nil : provider_state.to_s self end def with(request_details) interaction.request = Pact::Request::Expected.from_hash(request_details) self end def will_respond_with(response) interaction.response = response @callback.call interaction self end def on_interaction_fully_defined &block @callback = block end end end end
Version data entries
40 entries across 40 versions & 1 rubygems