Sha256: 9de210874c00ecaea07a779164a4c9ad6adfb7cc2e8bd1fdba08a33fa0323912
Contents?: true
Size: 560 Bytes
Versions: 5
Compression:
Stored size: 560 Bytes
Contents
require 'spec_helper' describe QueryDiet::Logger do before :each do QueryDiet::Logger.reset end describe 'count' do it "should return the number of queries since the last reset" do Movie.create Movie.create QueryDiet::Logger.count.should == 2 end end describe 'time' do it "should return the number of miliseconds spent running database queries since the last reset" do Benchmark.should_receive(:realtime).and_return(5) Movie.create QueryDiet::Logger.time.should == 5000 end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
query_diet-0.2.3 | spec/logger_spec.rb |
query_diet-0.2.2 | spec/logger_spec.rb |
query_diet-0.2.1 | spec/logger_spec.rb |
query_diet-0.2.0 | spec/logger_spec.rb |
query_diet-0.1.0 | spec/logger_spec.rb |