Skip to content
Browse files

ensure we only match on / as separator (1.8 behavior)

  • Loading branch information...
1 parent 570e026 commit 2ffa50c8f0d7d9896d21902470596886401d9469 @sd sd committed Mar 22, 2013
Showing with 6 additions and 0 deletions.
  1. +6 −0 spec/american_date_spec.rb
View
6 spec/american_date_spec.rb
@@ -38,6 +38,12 @@
specify "should not mismatch years" do
Date.parse('2003/01/02').should == Date.new(2003, 1, 2)
end
+
+ specify "should behave like 1.8 and only allow / as delimiters in american-style dates" do
+ Date.parse("10/11/2012").should == Date.new(2012, 10, 11)
+ Date.parse("10-11-2012").should == Date.new(2012, 11, 10)
+ Date.parse("10.11.2012").should == Date.new(2012, 11, 10)
+ end
end
describe "DateTime.parse" do

0 comments on commit 2ffa50c

Please sign in to comment.
Something went wrong with that request. Please try again.