spec/unit/controller/controller_spec.rb in request-log-analyzer-1.12.9 vs spec/unit/controller/controller_spec.rb in request-log-analyzer-1.12.10
- old
+ new
@@ -2,12 +2,12 @@
describe RequestLogAnalyzer::Controller do
it "should use a custom output generator correctly" do
- mock_output = mock('RequestLogAnalyzer::Output::Base')
- mock_output.stub!(:io).and_return(mock_io)
+ mock_output = double('RequestLogAnalyzer::Output::Base')
+ mock_output.stub(:io).and_return(mock_io)
mock_output.should_receive(:header)
mock_output.should_receive(:footer)
controller = RequestLogAnalyzer::Controller.new(mock_source, :output => mock_output)
@@ -15,11 +15,11 @@
end
it "should call aggregators correctly when run" do
controller = RequestLogAnalyzer::Controller.new(mock_source, :output => mock_output)
- mock_aggregator = mock('RequestLogAnalyzer::Aggregator::Base')
+ mock_aggregator = double('RequestLogAnalyzer::Aggregator::Base')
mock_aggregator.should_receive(:prepare).once.ordered
mock_aggregator.should_receive(:aggregate).with(an_instance_of(testing_format.request_class)).twice.ordered
mock_aggregator.should_receive(:finalize).once.ordered
mock_aggregator.should_receive(:report).once.ordered
@@ -28,10 +28,10 @@
end
it "should call filters when run" do
controller = RequestLogAnalyzer::Controller.new(mock_source, :output => mock_output)
- mock_filter = mock('RequestLogAnalyzer::Filter::Base')
+ mock_filter = double('RequestLogAnalyzer::Filter::Base')
mock_filter.should_receive(:filter).twice.and_return(nil)
controller.should_receive(:aggregate_request).twice.and_return(nil)
controller.filters << mock_filter
controller.run!