From 0656c98a59101231700fc55a992630c1b900bca4 Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Thu, 15 Aug 2024 09:56:50 +0100 Subject: [PATCH] chore: change expected message to value, rather than string cannot determine from incoming term, whether expected is string/int or decimal --- lib/pact/matchers/matchers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pact/matchers/matchers.rb b/lib/pact/matchers/matchers.rb index 0455425..c6c5395 100644 --- a/lib/pact/matchers/matchers.rb +++ b/lib/pact/matchers/matchers.rb @@ -78,7 +78,7 @@ def actual_term_diff term, actual, options if term.matcher.match(actual) NO_DIFF else - RegexpDifference.new term.matcher, options[:original] ||= actual, "Expected a #{options[:was_float] ? "Float" : options[:was_int] ? "Integer" : "String" } matching #{term.matcher.inspect} (like #{term.generate.inspect}) but got #{options[:was_float] || options[:was_int] ? class_name_with_value_in_brackets(options[:original]) : actual.inspect} at " + RegexpDifference.new term.matcher, options[:original] ||= actual, "Expected a Value matching #{term.matcher.inspect} (like #{term.generate.inspect}) but got #{options[:was_float] || options[:was_int] ? class_name_with_value_in_brackets(options[:original]) : actual.inspect} at " end end