summaryrefslogtreecommitdiff
path: root/spec/ruby/library/date/iso8601_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/date/iso8601_spec.rb')
-rw-r--r--spec/ruby/library/date/iso8601_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/ruby/library/date/iso8601_spec.rb b/spec/ruby/library/date/iso8601_spec.rb
index 21b0a4cedd..2c698db514 100644
--- a/spec/ruby/library/date/iso8601_spec.rb
+++ b/spec/ruby/library/date/iso8601_spec.rb
@@ -35,3 +35,10 @@ describe "Date.iso8601" do
-> { Date.iso8601(Object.new) }.should raise_error(TypeError)
end
end
+
+describe "Date._iso8601" do
+ it "returns an empty hash if the argument is a invalid Date" do
+ h = Date._iso8601('invalid')
+ h.should == {}
+ end
+end