From 5b3740e0f2799690afc245a8ee5d42198d61cb1a Mon Sep 17 00:00:00 2001 From: Zach Dennis Date: Wed, 4 May 2011 19:55:46 -0400 Subject: [PATCH] Updating import_test to be Ruby 1.9.2 compatible. Ruby 1.9.1 changed the Date.parse capabilities to no longer support MM/DD/YYYY functionality so we only test against YYYY/MM/DD. [fixes https://github.com/zdennis/activerecord-import/issues/19] --- test/import_test.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/test/import_test.rb b/test/import_test.rb index 92ed3e7..d89c5de 100644 --- a/test/import_test.rb +++ b/test/import_test.rb @@ -234,14 +234,9 @@ describe "#import" do end context "importing a datetime field" do - it "should import a date with MM/DD/YYYY format just fine" do - Topic.import [:author_name, :title, :last_read], [["Bob Jones", "Topic 1", "05/14/2010"]] - assert_equal "05/14/2010".to_date, Topic.last.last_read.to_date - end - it "should import a date with YYYY/MM/DD format just fine" do Topic.import [:author_name, :title, :last_read], [["Bob Jones", "Topic 2", "2010/05/14"]] - assert_equal "05/14/2010".to_date, Topic.last.last_read.to_date + assert_equal "2010/05/14".to_date, Topic.last.last_read.to_date end end end \ No newline at end of file