Sha256: 44492b31850f660bad2105a93081f9d719460f791b27cffbe59d44fc9d3fa5ef
Contents?: true
Size: 915 Bytes
Versions: 33
Compression:
Stored size: 915 Bytes
Contents
describe "Numeric Timer methods" do describe "Numeric" do it "should have a #later method" do @later = nil 0.9.seconds.later do @later = true end wait 1 { @later.should == true } end it "should have a #every method" do @every = 0 @stop_me = 480.milliseconds.every do @every += 1 end wait 1 { @every.should == 2 @stop_me.invalidate } end end describe "NSTimer" do it "should have a #later method" do @later = nil NSTimer.after(0.9.seconds) do @later = true end wait 1 { @later.should == true } end it "should have a #every method" do @every = 0 @stop_me = NSTimer.every(480.milliseconds) do @every += 1 end wait 1 { @every.should == 2 @stop_me.invalidate } end end end
Version data entries
33 entries across 33 versions & 1 rubygems