Sha256: b7ff516a13cb8d832730ea40fc4623ae9b05dedccaeb4621ab57fdd72ae7c6cb

Contents?: true

Size: 873 Bytes

Versions: 2

Compression:

Stored size: 873 Bytes

Contents

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

describe BigBench::PostProcessor::Graphs do
  
  before(:each) do
    Dir.chdir File.dirname(__FILE__)
    Dir.chdir ".."
  end
  
  it "should run and create the following graphs" do    
    folder = "tmp/graphs_#{Time.now.to_i}"
    
    BigBench.config.duration = 2.minutes
    BigBench.config.output = "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["tmp/*"].each{ |folder| FileUtils.rm_rf(folder) }
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bigbench-0.0.6 spec/post_processors/graphs_spec.rb
bigbench-0.0.5 spec/post_processors/graphs_spec.rb