spec/tracker_spec.rb in bigbench-0.0.3 vs spec/tracker_spec.rb in bigbench-0.0.4

- old
+ new

@@ -9,42 +9,42 @@ @tracker.track "a result" @tracker.trackings.size.should == 3 end it "should write trackings to the specified file in the local mode" do - BigBench.config.output = "spec/temp/test.ljson" + BigBench.config.output = "spec/tmp/test.ljson" BigBench.benchmark "index page call" => "http://localhost:3001" do get "/" end BigBench.run! BigBench.write_local_trackings_to_file! - File.exist?("spec/temp/test.ljson").should be_true - File.open("spec/temp/test.ljson") do |file| + File.exist?("spec/tmp/test.ljson").should be_true + File.open("spec/tmp/test.ljson") do |file| file.each_line{ |json| JSON.parse(json).is_a?(Hash).should be_true } end - File.delete "spec/temp/test.ljson" + File.delete "spec/tmp/test.ljson" end it "should gather the remote trackings and write them into a file" do BigBench::Store.setup!("http://localhost:6379").should be_true - BigBench.config.output = "spec/temp/test.ljson" + BigBench.config.output = "spec/tmp/test.ljson" BigBench::Store.add_tracking({ :tracking => true }.to_json) BigBench::Store.add_tracking({ :tracking => true }.to_json) BigBench::Store.add_tracking({ :tracking => true }.to_json) BigBench::Store.add_tracking({ :tracking => true }.to_json) BigBench::Store.add_tracking({ :tracking => true }.to_json) BigBench::Store.count_trackings.should == 5 BigBench.write_store_trackings_to_file! - File.exist?("spec/temp/test.ljson").should be_true - File.open("spec/temp/test.ljson") do |file| + File.exist?("spec/tmp/test.ljson").should be_true + File.open("spec/tmp/test.ljson") do |file| file.each_line{ |json| JSON.parse(json).is_a?(Hash).should be_true } end - File.delete "spec/temp/test.ljson" + File.delete "spec/tmp/test.ljson" end end \ No newline at end of file