Class: Pact::MockService::Interactions::ActualInteractions

Inherits:
Object
  • Object
show all
Defined in:
lib/pact/mock_service/interactions/actual_interactions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeActualInteractions

Returns a new instance of ActualInteractions.



10
11
12
# File 'lib/pact/mock_service/interactions/actual_interactions.rb', line 10

def initialize
  clear
end

Instance Attribute Details

#interaction_mismatchesObject (readonly)

Returns the value of attribute interaction_mismatches.



8
9
10
# File 'lib/pact/mock_service/interactions/actual_interactions.rb', line 8

def interaction_mismatches
  @interaction_mismatches
end

#matched_interactionsObject (readonly)

Returns the value of attribute matched_interactions.



8
9
10
# File 'lib/pact/mock_service/interactions/actual_interactions.rb', line 8

def matched_interactions
  @matched_interactions
end

#unexpected_requestsObject (readonly)

Returns the value of attribute unexpected_requests.



8
9
10
# File 'lib/pact/mock_service/interactions/actual_interactions.rb', line 8

def unexpected_requests
  @unexpected_requests
end

Instance Method Details

#clearObject

For testing, sigh



15
16
17
18
19
# File 'lib/pact/mock_service/interactions/actual_interactions.rb', line 15

def clear
  @matched_interactions = []
  @interaction_mismatches = []
  @unexpected_requests = []
end

#register_interaction_mismatch(interaction_mismatch) ⇒ Object



29
30
31
# File 'lib/pact/mock_service/interactions/actual_interactions.rb', line 29

def register_interaction_mismatch interaction_mismatch
  @interaction_mismatches << interaction_mismatch
end

#register_matched(interaction) ⇒ Object



21
22
23
# File 'lib/pact/mock_service/interactions/actual_interactions.rb', line 21

def register_matched interaction
  @matched_interactions << interaction
end

#register_unexpected_request(request) ⇒ Object



25
26
27
# File 'lib/pact/mock_service/interactions/actual_interactions.rb', line 25

def register_unexpected_request request
  @unexpected_requests << request
end