Exception: PactExpectations::VerifyError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/pact_expectations.rb

Instance Method Summary collapse

Constructor Details

#initialize(not_call_responses = [], not_call_reificated = []) ⇒ VerifyError

Returns a new instance of VerifyError.



57
58
59
60
# File 'lib/pact_expectations.rb', line 57

def initialize(not_call_responses = [], not_call_reificated = [])
  @not_call_responses = not_call_responses
  @not_call_reificated = not_call_reificated
end

Instance Method Details

#messageObject



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/pact_expectations.rb', line 62

def message
  message = String.new("\n")
  unless @not_call_responses.empty?
    message << create_not_call_message(
      "Some expectations were defined but not used to construct the Contract",
      @not_call_responses
    )
  end
  unless @not_call_reificated.empty?
    message << create_not_call_message(
      "Some expectations were defined but not used to stub Remote Facade",
      @not_call_reificated
    )
  end
  message
end