fixes for 1.9

This commit is contained in:
Brian Lopez 2010-08-02 02:07:11 -07:00
parent 9756a3f410
commit 5f81996122
2 changed files with 3 additions and 6 deletions

View File

@ -126,7 +126,8 @@ describe ActiveRecord::ConnectionAdapters::Mysql2Adapter do
test.decimal_test.should eql(BigDecimal.new('1.0000'))
test.date_test.should eql(Date.parse('2010-01-01'))
test.date_time_test.should eql(Time.local(2010,1,1,0,0,0))
test.timestamp_test.class.should eql(Time)
test.timestamp_test.class.should eql(ActiveSupport::TimeWithZone) if RUBY_VERSION >= "1.9"
test.timestamp_test.class.should eql(Time) if RUBY_VERSION < "1.9"
test.time_test.class.should eql(Time)
test.year_test.should eql(2010)
test.char_test.should eql('abcdefghij')

View File

@ -197,11 +197,7 @@ describe Mysql2::Result do
it "should return Time for a TIME value" do
@test_result['time_test'].class.should eql(Time)
if RUBY_VERSION >= "1.9.2"
@test_result['time_test'].strftime("%F %T").should eql('0000-01-01 11:44:00')
else
@test_result['time_test'].strftime("%F %T").should eql('2000-01-01 11:44:00')
end
@test_result['time_test'].strftime("%F %T").should eql('2000-01-01 11:44:00')
end
it "should return Date for a DATE value" do