Class: Pact::Consumer::InteractionReplay
- Inherits:
-
Object
- Object
- Pact::Consumer::InteractionReplay
- Includes:
- RackRequestHelper, Matchers
- Defined in:
- lib/pact/consumer/mock_service/interaction_replay.rb
Constant Summary
Constants included from RackRequestHelper
RackRequestHelper::REQUEST_KEYS
Constants included from Matchers
Matchers::DEFAULT_OPTIONS, Matchers::NO_DIFF_INDICATOR
Instance Attribute Summary collapse
-
#interaction_list ⇒ Object
Returns the value of attribute interaction_list.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, logger, interaction_list) ⇒ InteractionReplay
constructor
A new instance of InteractionReplay.
- #match?(env) ⇒ Boolean
- #respond(env) ⇒ Object
Methods included from RackRequestHelper
#params_hash, #request_as_hash_from
Methods included from Matchers
#actual_array_diff, #actual_hash_diff, #array_diff, #check_for_unexpected_keys, #class_diff, #classes_match?, #diff, #hash_diff, #object_diff, #regexp_diff, #structure_diff, #structure_diff_actual_display, #structure_diff_expected_display
Constructor Details
#initialize(name, logger, interaction_list) ⇒ InteractionReplay
Returns a new instance of InteractionReplay.
13 14 15 16 17 |
# File 'lib/pact/consumer/mock_service/interaction_replay.rb', line 13 def initialize name, logger, interaction_list @name = name @logger = logger @interaction_list = interaction_list end |
Instance Attribute Details
#interaction_list ⇒ Object
Returns the value of attribute interaction_list.
11 12 13 |
# File 'lib/pact/consumer/mock_service/interaction_replay.rb', line 11 def interaction_list @interaction_list end |
#logger ⇒ Object
Returns the value of attribute logger.
11 12 13 |
# File 'lib/pact/consumer/mock_service/interaction_replay.rb', line 11 def logger @logger end |
#name ⇒ Object
Returns the value of attribute name.
11 12 13 |
# File 'lib/pact/consumer/mock_service/interaction_replay.rb', line 11 def name @name end |
Instance Method Details
#match?(env) ⇒ Boolean
19 20 21 |
# File 'lib/pact/consumer/mock_service/interaction_replay.rb', line 19 def match? env true # default handler end |
#respond(env) ⇒ Object
23 24 25 |
# File 'lib/pact/consumer/mock_service/interaction_replay.rb', line 23 def respond env find_response request_as_hash_from(env) end |