Sha256: 0363a1fd8729c0627a46206360cfbb90bc6a59905f1aaaf760b1701c5f5b5307
Contents?: true
Size: 545 Bytes
Versions: 6
Compression:
Stored size: 545 Bytes
Contents
require(File.join(File.dirname(__FILE__), '..', 'date_spec_helper')) describe "Date#ordinal" do it "should be able to construct a Date object from an ordinal date" do lambda { Date.ordinal(1900, 366) }.should raise_error(ArgumentError) lambda { Date.ordinal(1900, 365) }.should_not raise_error(ArgumentError) lambda { Date.ordinal(2000, 366) }.should_not raise_error(ArgumentError) lambda { Date.ordinal(2000, 367) }.should raise_error(ArgumentError) Date.ordinal(2000, 288).should == Date.civil(2000, 10, 14) end end
Version data entries
6 entries across 6 versions & 1 rubygems