[spec] add test for RM-427

This commit is contained in:
Watson
2014-02-20 13:10:50 +09:00
parent fc832b6673
commit bfabd1b92f

View File

@@ -11,5 +11,15 @@ describe "NSDate" do
date = NSDate.alloc.initWithTimeIntervalSinceReferenceDate(-5978307200)
date.should == Time.at(-5000000000)
end
it ".distantFuture should return future time" do
date = NSDate.distantFuture
date.utc.to_i.should == (63113904000 + 978307200)
end
it ".distantPast should return past time" do
date = NSDate.distantPast
date.utc.to_i.should == (-63114076800 + 978307200)
end
end