Skip to content

Commit 9ba7854

Browse files
committed
correctly interpret $$lte as "less than OR EQUAL TO"
1 parent 0f878c9 commit 9ba7854

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

spec/runners/unified/assertions.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,8 @@ def assert_value_matches(actual, expected, msg)
385385
raise Error::ResultMismatch, "Actual value #{actual} does not match entity #{expected_v} with value #{result}"
386386
end
387387
when '$$lte'
388-
if actual.nil? || actual >= expected_v
389-
raise Error::ResultMismatch, "Actual value #{actual} should be less than #{expected_v}"
388+
if actual.nil? || actual > expected_v
389+
raise Error::ResultMismatch, "Actual value #{actual} should be less than or equal to #{expected_v}"
390390
end
391391
when '$$matchAsDocument'
392392
actual_v = BSON::ExtJSON.parse(actual)

0 commit comments

Comments
 (0)