File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -945,13 +945,11 @@ def check_around
945
945
aircraft = Aircraft . new ( name : "Boeing" )
946
946
assert_equal "Boeing" , aircraft . name
947
947
948
- time_before_saving = Time . now
949
948
aircraft . save!
950
- time_after_saving = Time . now
951
949
aircraft . reload
952
950
953
951
assert_equal "Boeing" , aircraft . name
954
- assert_includes time_before_saving - 1 .. time_after_saving + 1 , aircraft . manufactured_at
952
+ assert_in_delta Time . now , aircraft . manufactured_at , 1
955
953
end
956
954
end
957
955
Original file line number Diff line number Diff line change @@ -481,7 +481,7 @@ def test_insert_with_default_function
481
481
create_fixtures ( "aircrafts" )
482
482
483
483
aircraft = Aircraft . find_by ( name : "boeing-with-no-manufactured-at" )
484
- assert_equal Time . now . utc . strftime ( "%Y-%m-%d %H:%M:%S" ) , aircraft . manufactured_at . strftime ( "%Y-%m-%d %H:%M:%S" )
484
+ assert_in_delta Time . now , aircraft . manufactured_at , 1
485
485
end
486
486
487
487
def test_insert_with_default_value
You can’t perform that action at this time.
0 commit comments