spec/controller_spec.rb in request-log-analyzer-1.1.0 vs spec/controller_spec.rb in request-log-analyzer-1.1.1

- old
+ new

@@ -10,25 +10,26 @@ # end it "should call the aggregators when run" do mock_output = mock('output') + mock_output.stub!(:io).and_return($stdout) mock_output.should_receive(:header) - mock_output.should_receive(:footer) + mock_output.should_receive(:footer) file_format = RequestLogAnalyzer::FileFormat.load(:rails) - source = RequestLogAnalyzer::Source::LogFile.new(file_format, :source_files => log_fixture(:rails_1x)) + source = RequestLogAnalyzer::Source::LogParser.new(file_format, :source_files => log_fixture(:rails_1x)) controller = RequestLogAnalyzer::Controller.new(source, :output => mock_output) mock_aggregator = mock('aggregator') mock_aggregator.should_receive(:prepare).once.ordered - mock_aggregator.should_receive(:aggregate).with(an_instance_of(RequestLogAnalyzer::Request)).at_least(:twice).ordered + mock_aggregator.should_receive(:aggregate).with(an_instance_of(file_format.class::Request)).at_least(:twice).ordered mock_aggregator.should_receive(:finalize).once.ordered mock_aggregator.should_receive(:report).once.ordered another_mock_aggregator = mock('another aggregator') another_mock_aggregator.should_receive(:prepare).once.ordered - another_mock_aggregator.should_receive(:aggregate).with(an_instance_of(RequestLogAnalyzer::Request)).at_least(:twice).ordered + another_mock_aggregator.should_receive(:aggregate).with(an_instance_of(file_format.class::Request)).at_least(:twice).ordered another_mock_aggregator.should_receive(:finalize).once.ordered another_mock_aggregator.should_receive(:report).once.ordered controller.aggregators << mock_aggregator << another_mock_aggregator controller.run! \ No newline at end of file