require_relative "./helpers" describe BigBench::Bot do before(:each) do Dir.chdir File.dirname(__FILE__) BigBench::Store.reset! end it "should check for an empty receipt" do BigBench::Store.setup!("http://localhost:6379").should be_true BigBench::Bot.check_test! BigBench.benchmarks.size.should == 0 end it "should load and run a test from the redis store" do BigBench::Store.setup!("http://localhost:6379").should be_true test = File.open("tests/local.rb", "rb"){ |file| file.read } BigBench::Store.test = test BigBench::Store.start BigBench::Bot.check_test! BigBench.config.mode.should == :bot BigBench.benchmarks.size.should == 2 BigBench.benchmarks.each{ |benchmark| benchmark.runs.should == 1 } BigBench::Store.count_trackings.should > 100 end end