@@ -294,7 +294,7 @@ def options_range(start: 1, stop: 31, selected: nil, months: false)
294294 end
295295
296296 test "date selects are wrapped correctly" do
297- Timecop . freeze ( Time . utc ( 2012 , 2 , 3 ) ) do
297+ travel_to ( Time . utc ( 2012 , 2 , 3 ) ) do
298298 expected = <<-HTML . strip_heredoc
299299 < div class ="form-group ">
300300 < label for ="user_misc "> Misc</ label >
@@ -316,7 +316,7 @@ def options_range(start: 1, stop: 31, selected: nil, months: false)
316316 end
317317
318318 test "date selects are wrapped correctly with wrapper class" do
319- Timecop . freeze ( Time . utc ( 2012 , 2 , 3 ) ) do
319+ travel_to ( Time . utc ( 2012 , 2 , 3 ) ) do
320320 expected = <<-HTML . strip_heredoc
321321 < div class ="form-group none-margin ">
322322 < label for ="user_misc "> Misc</ label >
@@ -338,7 +338,7 @@ def options_range(start: 1, stop: 31, selected: nil, months: false)
338338 end
339339
340340 test "date selects inline when layout is horizontal" do
341- Timecop . freeze ( Time . utc ( 2012 , 2 , 3 ) ) do
341+ travel_to ( Time . utc ( 2012 , 2 , 3 ) ) do
342342 expected = <<-HTML . strip_heredoc
343343 < form accept-charset ="UTF-8 " action ="/users " class ="new_user " id ="new_user " method ="post " role ="form ">
344344 #{ '<input name="utf8" type="hidden" value="✓"/>' unless ::Rails ::VERSION ::STRING >= '6' }
@@ -366,7 +366,7 @@ def options_range(start: 1, stop: 31, selected: nil, months: false)
366366
367367 test "date selects are wrapped correctly with error" do
368368 @user . errors . add ( :misc , "error for test" )
369- Timecop . freeze ( Time . utc ( 2012 , 2 , 3 ) ) do
369+ travel_to ( Time . utc ( 2012 , 2 , 3 ) ) do
370370 expected = <<-HTML . strip_heredoc
371371 < form accept-charset ="UTF-8 " action ="/users " class ="new_user " id ="new_user " method ="post " role ="form ">
372372 #{ '<input name="utf8" type="hidden" value="✓"/>' unless ::Rails ::VERSION ::STRING >= '6' }
@@ -392,7 +392,7 @@ def options_range(start: 1, stop: 31, selected: nil, months: false)
392392 end
393393
394394 test "date selects with options are wrapped correctly" do
395- Timecop . freeze ( Time . utc ( 2012 , 2 , 3 ) ) do
395+ travel_to ( Time . utc ( 2012 , 2 , 3 ) ) do
396396 expected = <<-HTML . strip_heredoc
397397 < div class ="form-group ">
398398 < label for ="user_misc "> Misc</ label >
@@ -418,7 +418,7 @@ def options_range(start: 1, stop: 31, selected: nil, months: false)
418418 end
419419
420420 test "date selects with options and html_options are wrapped correctly" do
421- Timecop . freeze ( Time . utc ( 2012 , 2 , 3 ) ) do
421+ travel_to ( Time . utc ( 2012 , 2 , 3 ) ) do
422422 expected = <<-HTML . strip_heredoc
423423 < div class ="form-group ">
424424 < label for ="user_misc "> Misc</ label >
@@ -443,7 +443,7 @@ def options_range(start: 1, stop: 31, selected: nil, months: false)
443443 end
444444
445445 test "time selects are wrapped correctly" do
446- Timecop . freeze ( Time . utc ( 2012 , 2 , 3 , 12 , 0 , 0 ) ) do
446+ travel_to ( Time . utc ( 2012 , 2 , 3 , 12 , 0 , 0 ) ) do
447447 expected = <<-HTML . strip_heredoc
448448 < div class ="form-group ">
449449 < label for ="user_misc "> Misc</ label >
@@ -467,7 +467,7 @@ def options_range(start: 1, stop: 31, selected: nil, months: false)
467467
468468 test "time selects are wrapped correctly with error" do
469469 @user . errors . add ( :misc , "error for test" )
470- Timecop . freeze ( Time . utc ( 2012 , 2 , 3 , 12 , 0 , 0 ) ) do
470+ travel_to ( Time . utc ( 2012 , 2 , 3 , 12 , 0 , 0 ) ) do
471471 expected = <<-HTML . strip_heredoc
472472 < form accept-charset ="UTF-8 " action ="/users " class ="new_user " id ="new_user " method ="post " role ="form ">
473473 #{ '<input name="utf8" type="hidden" value="✓"/>' unless ::Rails ::VERSION ::STRING >= '6' }
@@ -494,7 +494,7 @@ def options_range(start: 1, stop: 31, selected: nil, months: false)
494494 end
495495
496496 test "time selects with options are wrapped correctly" do
497- Timecop . freeze ( Time . utc ( 2012 , 2 , 3 , 12 , 0 , 0 ) ) do
497+ travel_to ( Time . utc ( 2012 , 2 , 3 , 12 , 0 , 0 ) ) do
498498 expected = <<-HTML . strip_heredoc
499499 < div class ="form-group ">
500500 < label for ="user_misc "> Misc</ label >
@@ -519,7 +519,7 @@ def options_range(start: 1, stop: 31, selected: nil, months: false)
519519 end
520520
521521 test "time selects with options and html_options are wrapped correctly" do
522- Timecop . freeze ( Time . utc ( 2012 , 2 , 3 , 12 , 0 , 0 ) ) do
522+ travel_to ( Time . utc ( 2012 , 2 , 3 , 12 , 0 , 0 ) ) do
523523 expected = <<-HTML . strip_heredoc
524524 < div class ="form-group ">
525525 < label for ="user_misc "> Misc</ label >
@@ -544,7 +544,7 @@ def options_range(start: 1, stop: 31, selected: nil, months: false)
544544 end
545545
546546 test "datetime selects are wrapped correctly" do
547- Timecop . freeze ( Time . utc ( 2012 , 2 , 3 , 12 , 0 , 0 ) ) do
547+ travel_to ( Time . utc ( 2012 , 2 , 3 , 12 , 0 , 0 ) ) do
548548 expected = <<-HTML . strip_heredoc
549549 < div class ="form-group ">
550550 < label for ="user_misc "> Misc</ label >
@@ -575,7 +575,7 @@ def options_range(start: 1, stop: 31, selected: nil, months: false)
575575
576576 test "datetime selects are wrapped correctly with error" do
577577 @user . errors . add ( :misc , "error for test" )
578- Timecop . freeze ( Time . utc ( 2012 , 2 , 3 , 12 , 0 , 0 ) ) do
578+ travel_to ( Time . utc ( 2012 , 2 , 3 , 12 , 0 , 0 ) ) do
579579 expected = <<-HTML . strip_heredoc
580580 < form accept-charset ="UTF-8 " action ="/users " class ="new_user " id ="new_user " method ="post " role ="form ">
581581 #{ '<input name="utf8" type="hidden" value="✓"/>' unless ::Rails ::VERSION ::STRING >= '6' }
@@ -609,7 +609,7 @@ def options_range(start: 1, stop: 31, selected: nil, months: false)
609609 end
610610
611611 test "datetime selects with options are wrapped correctly" do
612- Timecop . freeze ( Time . utc ( 2012 , 2 , 3 , 12 , 0 , 0 ) ) do
612+ travel_to ( Time . utc ( 2012 , 2 , 3 , 12 , 0 , 0 ) ) do
613613 expected = <<-HTML . strip_heredoc
614614 < div class ="form-group ">
615615 < label for ="user_misc "> Misc</ label >
@@ -644,7 +644,7 @@ def options_range(start: 1, stop: 31, selected: nil, months: false)
644644 end
645645
646646 test "datetime selects with options and html_options are wrapped correctly" do
647- Timecop . freeze ( Time . utc ( 2012 , 2 , 3 , 12 , 0 , 0 ) ) do
647+ travel_to ( Time . utc ( 2012 , 2 , 3 , 12 , 0 , 0 ) ) do
648648 expected = <<-HTML . strip_heredoc
649649 < div class ="form-group ">
650650 < label for ="user_misc "> Misc</ label >
0 commit comments