diff options
Diffstat (limited to 'spec/ruby/library/date')
-rw-r--r-- | spec/ruby/library/date/iso8601_spec.rb | 7 | ||||
-rw-r--r-- | spec/ruby/library/date/rfc3339_spec.rb | 13 |
2 files changed, 20 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 diff --git a/spec/ruby/library/date/rfc3339_spec.rb b/spec/ruby/library/date/rfc3339_spec.rb new file mode 100644 index 0000000000..a8711d47b2 --- /dev/null +++ b/spec/ruby/library/date/rfc3339_spec.rb @@ -0,0 +1,13 @@ +require_relative '../../spec_helper' +require 'date' + +describe "Date.rfc3339" do + it "needs to be reviewed for spec completeness" +end + +describe "Date._rfc3339" do + it "returns an empty hash if the argument is a invalid Date" do + h = Date._rfc3339('invalid') + h.should == {} + end +end |