spec/date_spec.rb in partial-date-1.2.0 vs spec/date_spec.rb in partial-date-1.2.1

- old
+ new

@@ -17,16 +17,16 @@ date.year = 2000 date.value.should == 20000000 end it "should allow construction from a block of integers" do - new_date = PartialDate::Date.new {|d| d.year = 2010; d.month = 12; d.day = 1} - new_date.value.should == 20101201 + new_date = PartialDate::Date.new {|d| d.year = 2010; d.month = 11; d.day = 1} + new_date.value.should == 20101101 end it "should allow construction from a block of strings" do - new_date = PartialDate::Date.new {|d| d.year = "2010"; d.month = "12"; d.day = "1"} - new_date.value.should == 20101201 + new_date = PartialDate::Date.new {|d| d.year = "2010"; d.month = "11"; d.day = "1"} + new_date.value.should == 20101101 end it "should allow construction from the class load method" do new_date = PartialDate::Date.load(20120000) new_date.year.should == 2012