Sha256: 079a1bf31198a9c56b7e79a9bf10e62a20d4c5ab4e5be3c816aea8c83bfa6b07
Contents?: true
Size: 301 Bytes
Versions: 21
Compression:
Stored size: 301 Bytes
Contents
require 'spec_helper' describe Hitimes do it "can time a block of code" do d = Hitimes.measure do sleep 0.2 end d.must_be_close_to(0.2, 0.002) end it "raises an error if measure is called with no block" do lambda{ Hitimes.measure }.must_raise( Hitimes::Error ) end end
Version data entries
21 entries across 19 versions & 4 rubygems