Sha256: aa3a5df2375fe6a12165c93503557e6e948868113aa5d7e7e1616ddeef2630ff

Contents?: true

Size: 855 Bytes

Versions: 1

Compression:

Stored size: 855 Bytes

Contents

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bigbench-0.0.6 spec/bot_spec.rb