Skip to content

Commit

Permalink
chore: change expected message to value, rather than string
Browse files Browse the repository at this point in the history
cannot determine from incoming term, whether expected is string/int or decimal
  • Loading branch information
YOU54F committed Aug 15, 2024
1 parent 3cd978d commit 0656c98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pact/matchers/matchers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 <path>"
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 <path>"
end
end

Expand Down

0 comments on commit 0656c98

Please sign in to comment.