Sha256: 23e6bee3a44f22a2e5b3a0721a52d9d7ff37b8550b456ef0f1023880f7fb25dc

Contents?: true

Size: 464 Bytes

Versions: 6

Compression:

Stored size: 464 Bytes

Contents

describe :date_jd, :shared => true do
  it "constructs a Date object if passed a Julian day" do
    Date.send(@method, 2454482).should == Date.civil(2008, 1, 16)
  end

  it "returns a Date object representing Julian day 0 (-4712-01-01) if no arguments passed"do
    Date.send(@method).should == Date.civil(-4712, 1, 1)
  end

  it "constructs a Date object if passed a negative number" do
    Date.send(@method, -1).should == Date.civil(-4713, 12, 31)
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rubysl-date-2.0.9 spec/date/shared/jd.rb
rubysl-date-2.0.8 spec/date/shared/jd.rb
rubysl-date-2.0.6 spec/date/shared/jd.rb
rubysl-date-2.0.5 spec/date/shared/jd.rb
rubysl-date-2.0.3 spec/date/shared/jd.rb
rubysl-date-1.0.1 spec/date/shared/jd.rb