From 5fcaf917612c61174f55bbd2301131ccdbec51fb Mon Sep 17 00:00:00 2001 From: Raimonds Simanovskis Date: Tue, 16 Feb 2010 21:43:13 +0200 Subject: fix conditions when DateTime#to_date and DateTime#xmlschema methods are defined --- activesupport/test/abstract_unit.rb | 2 +- activesupport/test/core_ext/date_time_ext_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'activesupport/test') diff --git a/activesupport/test/abstract_unit.rb b/activesupport/test/abstract_unit.rb index ea6ebca3ce..dd84860a91 100644 --- a/activesupport/test/abstract_unit.rb +++ b/activesupport/test/abstract_unit.rb @@ -18,7 +18,7 @@ ENV['NO_RELOAD'] = '1' require 'active_support' # Include shims until we get off 1.8.6 -require 'active_support/ruby/shim' +require 'active_support/ruby/shim' if RUBY_VERSION < '1.8.7' def uses_memcached(test_name) require 'memcache' diff --git a/activesupport/test/core_ext/date_time_ext_test.rb b/activesupport/test/core_ext/date_time_ext_test.rb index eba8170cda..19d7935211 100644 --- a/activesupport/test/core_ext/date_time_ext_test.rb +++ b/activesupport/test/core_ext/date_time_ext_test.rb @@ -26,11 +26,11 @@ class DateTimeExtCalculationsTest < Test::Unit::TestCase end def test_to_date - assert_equal Date.new(2005, 2, 21), DateTime.new(2005, 2, 21).to_date + assert_equal Date.new(2005, 2, 21), DateTime.new(2005, 2, 21, 14, 30, 0).to_date end def test_to_datetime - assert_equal DateTime.new(2005, 2, 21), DateTime.new(2005, 2, 21).to_datetime + assert_equal DateTime.new(2005, 2, 21, 14, 30, 0), DateTime.new(2005, 2, 21, 14, 30, 0).to_datetime end def test_to_time -- cgit v1.2.3