Sha256: 39fd67d5fa2cb8c247016494c5efe1270ab7e18924c7931756e1c54c423f758a

Contents?: true

Size: 804 Bytes

Versions: 1

Compression:

Stored size: 804 Bytes

Contents

require_relative "../helpers"
require_relative "../../lib/bigbench/post_processor/graphs"

describe BigBench::PostProcessor::Graphs do
  
  it "should run and create the following graphs" do    
    folder = "spec/tmp/graphs_#{Time.now.to_i}"
    
    BigBench.config.duration = 2.minutes
    BigBench.config.output = "spec/tests/sample_results_big.ljson"
    BigBench.benchmark("index page" => "http://localhost:3001"){ get "/" }
    BigBench.post_process :graphs, :folder => folder
    
    BigBench.benchmarks.should      have(1).benchmark
    BigBench.post_processors.should have(1).processor
    
    lambda{ BigBench.post_processors.first.run! }.should_not raise_exception
    Dir["#{folder}/*.png"].size.should == 18
    
    Dir["spec/tmp/*"].each{ |folder| FileUtils.rm_rf(folder) }
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bigbench-0.0.4 spec/post_processors/graphs_spec.rb