diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-02-03 16:30:06 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-02-03 16:30:06 -0200 |
commit | ff8bc503c04c0d7fe50d03b8d7442b881a20170a (patch) | |
tree | 6e37bdd1d2a454a59d8cf57fbd9c0de66ca5b90d /activesupport/lib | |
parent | e30cb83c7a063302c2fc1b4f913ae7d50f594425 (diff) | |
parent | a57ddc58ac4e7a8b058cdaa0179cd897c2960c83 (diff) | |
download | rails-ff8bc503c04c0d7fe50d03b8d7442b881a20170a.tar.gz rails-ff8bc503c04c0d7fe50d03b8d7442b881a20170a.tar.bz2 rails-ff8bc503c04c0d7fe50d03b8d7442b881a20170a.zip |
Merge pull request #18758 from yuki24/change-travel-to-stub-datetime-too
Change AS::Testing::TimeHelpers#travel_to to also stub DateTime.now
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/testing/time_helpers.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/testing/time_helpers.rb b/activesupport/lib/active_support/testing/time_helpers.rb index 8c63815660..df5186ddec 100644 --- a/activesupport/lib/active_support/testing/time_helpers.rb +++ b/activesupport/lib/active_support/testing/time_helpers.rb @@ -99,6 +99,7 @@ module ActiveSupport simple_stubs.stub_object(Time, :now, now) simple_stubs.stub_object(Date, :today, now.to_date) + simple_stubs.stub_object(DateTime, :now, now.to_datetime) if block_given? begin |