aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/testing
diff options
context:
space:
mode:
authorYuki Nishijima <mail@yukinishijima.net>2015-01-31 17:37:11 -0800
committerYuki Nishijima <mail@yukinishijima.net>2015-02-03 05:23:23 -0800
commita57ddc58ac4e7a8b058cdaa0179cd897c2960c83 (patch)
tree4587dee203616e9b07ca610eb38214971728d04b /activesupport/lib/active_support/testing
parent826ed62ff6bcc7bb5f91480c998cb1c04c139faf (diff)
downloadrails-a57ddc58ac4e7a8b058cdaa0179cd897c2960c83.tar.gz
rails-a57ddc58ac4e7a8b058cdaa0179cd897c2960c83.tar.bz2
rails-a57ddc58ac4e7a8b058cdaa0179cd897c2960c83.zip
Change AS::Testing::TimeHelpers#travel_to to also stub DateTime.now
Diffstat (limited to 'activesupport/lib/active_support/testing')
-rw-r--r--activesupport/lib/active_support/testing/time_helpers.rb1
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