Sha256: 7cd4c7291fc9d4333ad81d960c1e25161bb0081fa5c145e566eb827bcd1f018d
Contents?: true
Size: 1.52 KB
Versions: 16
Compression:
Stored size: 1.52 KB
Contents
require File.dirname(__FILE__) + '/../spec_helper.rb' 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
16 entries across 16 versions & 2 rubygems