1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

7 commits

Author SHA1 Message Date
Rafael Mendonça França
bbbabc22c1
Make sure the time method is unstubed
The minitest stubs were conflicting with the time travel stubs so the
travel_back method call in the teardown block was actually keeping the
time stubbed.
2016-07-17 05:13:20 -03:00
Vipul A M
919e705362
travel/travel_to travel time helpers, now raise on nested calls,
as this can lead to confusing time stubbing.

     Instead of:

         travel_to 2.days.from_now do
           # 2 days from today
           travel_to 3.days.from_now do
             # 5 days from today
           end
         end

     preferred way to achieve above is:

         travel_to 2.days.from_now
         # 2 days from today

         travel_back
         travel_to 5.days.from_now
         # 5 days from today

Closes #24690
Fixes #24689
2016-07-02 15:09:34 -07:00
Ronak Jangir
81d2ce96d0 Removed mocha stubbing in active_support 2015-06-07 19:18:58 +05:30
Ankit Gupta
40fe833493 as/core_ext require's not used 2015-05-08 10:39:30 -04:00
Yuki Nishijima
a57ddc58ac Change AS::Testing::TimeHelpers#travel_to to also stub DateTime.now 2015-02-03 05:23:23 -08:00
Zachary Scott
a5d50ac147 Move date and time requires to time_travel_test, also include
'abstract_unit'.

cc #16564
2014-08-19 13:17:23 -07:00
Zachary Scott
ab291e8718 Move TimeHelperTest to TimeTravelTest from as/test_test.rb 2014-08-19 11:29:26 -07:00