Sha256: 989ea2865db908829379d5b563c0f4cd3c1b0149a8e615d27e95e2fdfb5fcb93
Contents?: true
Size: 1.49 KB
Versions: 30
Compression:
Stored size: 1.49 KB
Contents
require 'spec_helper' describe RequestLogAnalyzer, 'when harvesting like munin-plugins-rails the YAML output' do before(:each) do cleanup_temp_files! run("#{log_fixture(:rails_1x)} --dump #{temp_output_file(:yaml)}") @rla = YAML::load(File.read(temp_output_file(:yaml))) end after(:each) do cleanup_temp_files! end it "should contain database times" do @rla["Database time"].each do |item| item[1][:min].should_not be_nil item[1][:max].should_not be_nil item[1][:hits].should_not be_nil item[1][:sum].should_not be_nil end end it "should contain request times" do @rla["Request duration"].each do |item| item[1][:min].should_not be_nil item[1][:max].should_not be_nil item[1][:hits].should_not be_nil item[1][:sum].should_not be_nil end end it "should contain failed requests" do @rla.keys.should include("Failed requests") end it "should contain Process blockers" do @rla.keys.should include("Process blockers (> 1 sec duration)") end it "should contain HTTP Methods" do @rla["HTTP methods"]["GET"].should_not be_nil end it "should contain HTTP Methods" do @rla["HTTP methods"]["GET"].should_not be_nil end it "should contain view rendering times" do @rla["View rendering time"].each do |item| item[1][:min].should_not be_nil item[1][:max].should_not be_nil item[1][:hits].should_not be_nil item[1][:sum].should_not be_nil end end end
Version data entries
30 entries across 30 versions & 1 rubygems