@@ -10,7 +10,7 @@ def test_time_monotonic_travel_past
10
10
current = Process . clock_gettime ( Process ::CLOCK_MONOTONIC )
11
11
end
12
12
13
- assert ( now > current , "now #{ now } should be bigger than current #{ current } " )
13
+ assert_operator ( now , :> , current , "now #{ now } should be bigger than current #{ current } " )
14
14
end
15
15
16
16
def test_time_monotonic_travel_future
@@ -20,7 +20,7 @@ def test_time_monotonic_travel_future
20
20
current = Process . clock_gettime ( Process ::CLOCK_MONOTONIC )
21
21
end
22
22
23
- assert ( now + 5 < current , "now #{ now } should be less than current #{ current } at least by 5 secs" )
23
+ assert_operator ( now + 5 , :< , current , "now #{ now } should be less than current #{ current } at least by 5 secs" )
24
24
end
25
25
26
26
def test_time_travel_past
@@ -30,7 +30,7 @@ def test_time_travel_past
30
30
current = Time . now
31
31
end
32
32
33
- assert ( now > current , "now #{ now } should be bigger than current #{ current } " )
33
+ assert_operator ( now , :> , current , "now #{ now } should be bigger than current #{ current } " )
34
34
end
35
35
36
36
def test_time_travel_future
@@ -40,6 +40,6 @@ def test_time_travel_future
40
40
current = Time . now
41
41
end
42
42
43
- assert ( now + 5 < current , "now #{ now } should be less than current #{ current } at least by 5 secs" )
43
+ assert_operator ( now + 5 , :< , current , "now #{ now } should be less than current #{ current } at least by 5 secs" )
44
44
end
45
45
end
0 commit comments