aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/time_travel_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Should escape meta characters in regexpRyuta Kamizono2017-05-071-1/+1
|
* correctly check error messageyuuji.yaginuma2017-01-251-1/+2
| | | | | | | `assert_raise` does not check error message. However, in some tests, it seems like expecting error message checking with `assert_raise`. Instead of specifying an error message in `assert_raise`, modify to use another assert to check the error message.
* 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