From 82718e6dad9611be0b08b8e80d2b57eac0116bf4 Mon Sep 17 00:00:00 2001 From: Brian Lopez Date: Tue, 1 Jun 2010 23:40:16 -0700 Subject: [PATCH] fix specs under 1.9.2 preview3 --- spec/mysql2/result_spec.rb | 6 +++++- spec/spec_helper.rb | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/spec/mysql2/result_spec.rb b/spec/mysql2/result_spec.rb index 3e04e93..9224446 100644 --- a/spec/mysql2/result_spec.rb +++ b/spec/mysql2/result_spec.rb @@ -176,7 +176,11 @@ describe Mysql2::Result do it "should return Time for a TIME value" do @test_result['time_test'].class.should eql(Time) - @test_result['time_test'].strftime("%F %T").should eql('2000-01-01 11:44:00') + 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 diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index ca99e87..4d942a6 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/..') $LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib') require 'mysql2'