From a57ddc58ac4e7a8b058cdaa0179cd897c2960c83 Mon Sep 17 00:00:00 2001 From: Yuki Nishijima Date: Sat, 31 Jan 2015 17:37:11 -0800 Subject: Change AS::Testing::TimeHelpers#travel_to to also stub DateTime.now --- activesupport/lib/active_support/testing/time_helpers.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activesupport/lib/active_support') 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 -- cgit v1.2.3