Skip to content

Commit 6c251fb

Browse files
committed
[API] Test Runner: Updates matcher regular expression for big numbers
1 parent 676eedd commit 6c251fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api-spec-testing/rspec_matchers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def compare_string(expected, actual_value, test, response)
233233
parsed = parsed.gsub(/\$\{?#{match.first}\}?/, test.cached_values[match.first])
234234
end
235235
/#{parsed.tr("/", "")}/ =~ actual_value
236-
elsif !!(expected.match?(/^[0-9]{1}\.[0-9]+E[0-9]+/))
236+
elsif !!(expected.match?(/^-?[0-9]{1}\.[0-9]+E[0-9]+/))
237237
# When the value in the yaml test is a big number, the format is
238238
# different from what Ruby uses, so we transform X.XXXXEXX to X.XXXXXe+XX
239239
# to be able to compare the values

0 commit comments

Comments
 (0)