Sha256: 55fb1b79592c8f20744cb1a3ceef281c1b942fea26513a1b438b8703022642e5
Contents?: true
Size: 975 Bytes
Versions: 30
Compression:
Stored size: 975 Bytes
Contents
require '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
30 entries across 30 versions & 1 rubygems