class PactExpectations::ExpectationNotCalled
Public Class Methods
new(not_call_responses = [], not_call_reificated = [])
click to toggle source
# File lib/pact_expectations.rb, line 16 def initialize(not_call_responses = [], not_call_reificated = []) @not_call_responses = not_call_responses @not_call_reificated = not_call_reificated end
Public Instance Methods
message()
click to toggle source
# File lib/pact_expectations.rb, line 21 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
Private Instance Methods
create_not_call_message(title, list)
click to toggle source
# File lib/pact_expectations.rb, line 40 def create_not_call_message(title, list) message = String.new("#{title}:\n") list.each do |key| message << "- #{key}\n" end message << "\n" end