Sha256: 0efddb8fa89968fbee8f484e332a0ef5c715ab3edd16104af1f3699fccc71c1e
Contents?: true
Size: 803 Bytes
Versions: 6
Compression:
Stored size: 803 Bytes
Contents
require(File.join(File.dirname(__FILE__), '..', 'date_spec_helper')) describe "Date#leap?" do it "should be true if the current date is a leap year and no argument is given" do Date.civil(2000, 10, 11).leap?.should == true Date.civil(2004, 10, 11).leap?.should == true Date.civil(2008, 10, 11).leap?.should == true Date.civil(1996, 10, 11).leap?.should == true Date.civil(1600, 10, 11).leap?.should == true end it "should be false if the current date is not a leap year and no argument is given" do Date.civil(1700, 10, 11).leap?.should == false Date.civil(1800, 10, 11).leap?.should == false Date.civil(1900, 10, 11).leap?.should == false Date.civil(1999, 10, 11).leap?.should == false Date.civil(2001, 10, 11).leap?.should == false end end
Version data entries
6 entries across 6 versions & 1 rubygems