aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/time_travel_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Make time travel work with subclasses of Time/Date/DatetimeJonas Nicklas2017-01-101-0/+19
| | | | | Closes #27614 Previously when calling `now` on a subclass of e.g. `Time` it would return an instance of `Time` instead of returning an instance of the subclass. This way, we always return the correct class.
* applies new string literal convention in activesupport/testXavier Noria2016-08-061-3/+3
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Make sure the time method is unstubedRafael Mendonça França2016-07-171-29/+41
| | | | | | 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.
* `travel/travel_to` travel time helpers, now raise on nested calls,Vipul A M2016-07-021-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Removed mocha stubbing in active_supportRonak Jangir2015-06-071-46/+54
|
* as/core_ext require's not usedAnkit Gupta2015-05-081-1/+0
|
* Change AS::Testing::TimeHelpers#travel_to to also stub DateTime.nowYuki Nishijima2015-02-031-0/+11
|
* Move date and time requires to time_travel_test, also includeZachary Scott2014-08-191-0/+4
| | | | | | 'abstract_unit'. cc #16564
* Move TimeHelperTest to TimeTravelTest from `as/test_test.rb`Zachary Scott2014-08-191-0/+68