From becdb49186c575bf96a82a949ac04b6078680d52 Mon Sep 17 00:00:00 2001 From: Geoff Buesing Date: Sat, 24 Nov 2007 04:59:21 +0000 Subject: Honor Ruby's default calendar reform setting when creating DateTime objects via ActiveRecord's Time -> DateTime overflow, Time#time_with_datetime_fallback, Time#to_datetime, Date#to_datetime and String#to_datetime. Closes #10201 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8199 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/migration_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activerecord/test') diff --git a/activerecord/test/migration_test.rb b/activerecord/test/migration_test.rb index 00081dca56..64b8d51f39 100644 --- a/activerecord/test/migration_test.rb +++ b/activerecord/test/migration_test.rb @@ -286,7 +286,7 @@ if ActiveRecord::Base.connection.supports_migrations? :bio => "I was born ....", :age => 18, :height => 1.78, :wealth => BigDecimal.new("12345678901234567890.0123456789"), :birthday => 18.years.ago, :favorite_day => 10.days.ago, - :moment_of_truth => "1582-10-10 21:40:18", :male => true + :moment_of_truth => "1782-10-10 21:40:18", :male => true end bob = Person.find(:first) @@ -323,6 +323,7 @@ if ActiveRecord::Base.connection.supports_migrations? assert_equal DateTime.now.offset, bob.moment_of_truth.offset assert_not_equal 0, bob.moment_of_truth.offset assert_not_equal "Z", bob.moment_of_truth.zone + assert_equal DateTime::ITALY, bob.moment_of_truth.start end assert_equal TrueClass, bob.male?.class -- cgit v1.2.3