spec/post_processors/environment_spec.rb in bigbench-0.0.4 vs spec/post_processors/environment_spec.rb in bigbench-0.0.5
- old
+ new
@@ -1,12 +1,14 @@
require_relative "../helpers"
describe BigBench::PostProcessor::Environment do
before(:each) do
+ Dir.chdir File.dirname(__FILE__)
+ Dir.chdir ".."
BigBench.config.duration = 7.seconds
- BigBench.config.output = "spec/tests/sample_results_small.ljson"
+ BigBench.config.output = "tests/sample_results_small.ljson"
class << self
include BigBench::PostProcessor::Environment
end
@@ -264,11 +266,11 @@
end
context "benchmark scope", :benchmark do
before(:each) do
- BigBench.config.output = "spec/tests/sample_results_small.ljson"
+ BigBench.config.output = "tests/sample_results_small.ljson"
BigBench.benchmark("index page" => "http://localhost:3001"){ get "/" }
BigBench.benchmark("logout page" => "http://localhost:3001"){ get "/" }
end
it "should offer an iterator over the benchmarks and set the scope", :scope do
@@ -360,10 +362,10 @@
context "inkonsistant test data", :inconsistant do
before(:each) do
BigBench.config.duration = 20.seconds
- BigBench.config.output = "spec/tests/result.ljson"
+ BigBench.config.output = "tests/result.ljson"
end
it "should work with statistics" do
statistics.durations.min.should == 82
statistics(1.minute).durations.min.should == 82
\ No newline at end of file