Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- it "takes about 0 seconds to run an empty block" do
- elapsed_time = measure do
- end
- elapsed_time.should be_within(0.1).of(0)
- end
- it "takes exactly 0 seconds to run an empty block (with stubs)" do
- Time.stub(:now) { @eleven_am }
- elapsed_time = measure do
- end
- elapsed_time.should == 0
- end
Advertisement
Add Comment
Please, Sign In to add comment