Skip to content

Commit a4a2789

Browse files
committed
[API] Test Runner: Updates compare_string for big number tests
1 parent 712cb2b commit a4a2789

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

elasticsearch-api/api-spec-testing/rspec_matchers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def compare_string(expected, actual_value, test, response)
245245
# When the value in the yaml test is a big number, the format is
246246
# different from what Ruby uses, so we transform X.XXXXEXX to X.XXXXXe+XX
247247
# to be able to compare the values
248-
actual_value.to_s == expected.gsub('E', 'e+')
248+
actual_value.to_s == expected.gsub('E', 'e+') || actual_value == expected
249249
elsif expected == '' && actual_value != ''
250250
actual_value == response
251251
else

0 commit comments

Comments
 (0)