Skip to content

Commit

Permalink
Revert "Temporary ignored the failing specs for Date"
Browse files Browse the repository at this point in the history
This reverts commit 17e64cca6b737060884f6fd9ab1c5055e9b49577.

The specs should work now.
  • Loading branch information
mame authored and eregon committed Nov 29, 2021
1 parent 0fda60c commit d36574a
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions library/date/iso8601_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,18 @@
d.should == Date.civil(-4712, 1, 1)
end

ruby_version_is ""..."3.1" do
it "parses a Symbol into a Date object" do
d = Date.iso8601(:'2015-10-15')
d.should == Date.civil(2015, 10, 15)
end
it "parses a Symbol into a Date object" do
d = Date.iso8601(:'2015-10-15')
d.should == Date.civil(2015, 10, 15)
end

it "parses a StringSubclass into a Date object" do
d = Date.iso8601(Class.new(String).new("-4712-01-01"))
d.should == Date.civil(-4712, 1, 1)
end

ruby_version_is ""..."3.1" do
it "raises an ArgumentError when passed a Symbol without a valid Date" do
-> { Date.iso8601(:test) }.should raise_error(ArgumentError)
end
it "raises an ArgumentError when passed a Symbol without a valid Date" do
-> { Date.iso8601(:test) }.should raise_error(ArgumentError)
end

it "raises a TypeError when passed an Object" do
Expand Down

0 comments on commit d36574a

Please sign in to comment.