spec/lib/cacher/partial/subtoken_spec.rb in picky-0.2.1 vs spec/lib/cacher/partial/subtoken_spec.rb in picky-0.2.2

- old
+ new

@@ -26,11 +26,11 @@ :flav => [2], :fla => [2] } end it "should be fast" do - Benchmark.realtime { @cacher.generate_from( :florian => [1], :flavia => [2] ) }.should < 0.0001 + performance_of { @cacher.generate_from( :florian => [1], :flavia => [2] ) }.should < 0.0001 end it "should handle duplicate ids" do @cacher.generate_from( :flo => [1], :fla => [1] ).should == { :flo => [1], :fl => [1], @@ -104,11 +104,11 @@ character = abc.shift abc << character end end it "should be fast" do - Benchmark.realtime { @cacher.generate_from(@index) }.should < 0.005 + performance_of { @cacher.generate_from(@index) }.should < 0.005 end end describe "a bigger example with almost identical symbols" do before(:each) do abc = ('A'..'Z').to_a + ('a'..'z').to_a @@ -116,10 +116,10 @@ 52.times do |i| @index[(abc.join + abc[i].to_s).to_sym] = [i] end end it "should be fast" do - Benchmark.realtime { @cacher.generate_from(@index) }.should < 0.003 + performance_of { @cacher.generate_from(@index) }.should < 0.003 end end end context 'starting_at -1' do before(:each) do \ No newline at end of file