Sha256: 294294bc4435847ebbbe72889add5ce775c2a9bb2f91529eec8e5d544a9ac335
Contents?: true
Size: 1007 Bytes
Versions: 9
Compression:
Stored size: 1007 Bytes
Contents
require File.dirname(__FILE__) + '/../../spec_helper' describe RequestLogAnalyzer::Tracker::Traffic do describe '#report' do before(:each) do @tracker = RequestLogAnalyzer::Tracker::Traffic.new(:category => :category, :traffic => :traffic) @tracker.prepare end it "should generate a report without errors when one category is present" do @tracker.update(request(:category => 'a', :traffic => 2)) @tracker.report(mock_output) lambda { @tracker.report(mock_output) }.should_not raise_error end it "should generate a report without errors when no category is present" do lambda { @tracker.report(mock_output) }.should_not raise_error end it "should generate a report without errors when multiple categories are present" do @tracker.update(request(:category => 'a', :traffic => 2)) @tracker.update(request(:category => 'b', :traffic => 2)) lambda { @tracker.report(mock_output) }.should_not raise_error end end end
Version data entries
9 entries across 9 versions & 1 rubygems