diff --git a/spec/active_record/active_record_spec.rb b/spec/active_record/active_record_spec.rb index 782d581..055db0e 100644 --- a/spec/active_record/active_record_spec.rb +++ b/spec/active_record/active_record_spec.rb @@ -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') diff --git a/spec/mysql2/result_spec.rb b/spec/mysql2/result_spec.rb index 3d553b2..8585656 100644 --- a/spec/mysql2/result_spec.rb +++ b/spec/mysql2/result_spec.rb @@ -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