mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-01 09:31:20 +08:00
[spec] add test for RM-427
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user