mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-21 19:43:03 +08:00
[spec] add regression test for RM-337
This commit is contained in:
@@ -20,3 +20,16 @@ describe "Time" do
|
||||
end
|
||||
end
|
||||
|
||||
#RM-337
|
||||
describe "Time#hash" do
|
||||
class Time
|
||||
def to_nsdate
|
||||
NSDate.dateWithTimeIntervalSince1970(self.to_i)
|
||||
end
|
||||
end
|
||||
|
||||
it "should be equal after converting NSDate to Time" do
|
||||
a = Time.now
|
||||
a.to_nsdate.hash.should == a.to_nsdate.hash
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user