Sha256: a2677f98616933fb98768c81f5158a6621cbfcae60257a576dcd88f227edd147
Contents?: true
Size: 488 Bytes
Versions: 1
Compression:
Stored size: 488 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe "Bench" do it "runs in under 2 seconds" do lambda { sleep(0.1) }.should run_in(0.2.seconds) end it "fails to run in under 2.5 seconds" do lambda { sleep(0.2) }.should_not run_in(0.1.seconds) end it "intentionally fails" do block = lambda { sleep(0.2) } message = lambda { block.should run_in(0.1.seconds) }.should raise_error(Spec::Expectations::ExpectationNotMetError) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
spec-bench-0.0.0 | spec/bench_spec.rb |