fixes for 1.9
This commit is contained in:
parent
9756a3f410
commit
5f81996122
@ -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')
|
||||
|
@ -197,12 +197,8 @@ 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
|
||||
end
|
||||
|
||||
it "should return Date for a DATE value" do
|
||||
@test_result['date_test'].class.should eql(Date)
|
||||
|
Loading…
Reference in New Issue
Block a user