spec/log_parser_spec.rb in request-log-analyzer-1.1.0 vs spec/log_parser_spec.rb in request-log-analyzer-1.1.1
- old
+ new
@@ -1,12 +1,12 @@
require File.dirname(__FILE__) + '/spec_helper'
-describe RequestLogAnalyzer::LogParser, :requests do
+describe RequestLogAnalyzer::Source::LogParser, :requests do
include RequestLogAnalyzerSpecHelper
before(:each) do
- @log_parser = RequestLogAnalyzer::LogParser.new(spec_format)
+ @log_parser = RequestLogAnalyzer::Source::LogParser.new(spec_format)
end
it "should have multiple line definitions" do
@log_parser.file_format.line_definitions.length.should >= 2
end
@@ -14,17 +14,17 @@
it "should have a valid language" do
@log_parser.file_format.should be_valid
end
it "should parse more lines than requests" do
- @log_parser.should_receive(:handle_request).with(an_instance_of(RequestLogAnalyzer::Request)).twice
+ @log_parser.should_receive(:handle_request).with(an_instance_of(SpecFormat::Request)).twice
@log_parser.parse_file(log_fixture(:test_language_combined))
@log_parser.parsed_lines.should > 2
end
it "should parse requests spanned over multiple files" do
- @log_parser.should_receive(:handle_request).with(an_instance_of(RequestLogAnalyzer::Request)).once
+ @log_parser.should_receive(:handle_request).with(an_instance_of(SpecFormat::Request)).once
@log_parser.parse_files([log_fixture(:multiple_files_1), log_fixture(:multiple_files_2)])
end
it "should parse all request values when spanned over multiple files" do
@log_parser.parse_files([log_fixture(:multiple_files_1), log_fixture(:multiple_files_2)]) do |request|
@@ -45,14 +45,14 @@
io.close
end
end
-describe RequestLogAnalyzer::LogParser, :warnings do
+describe RequestLogAnalyzer::Source::LogParser, :warnings do
include RequestLogAnalyzerSpecHelper
before(:each) do
- @log_parser = RequestLogAnalyzer::LogParser.new(spec_format)
+ @log_parser = RequestLogAnalyzer::Source::LogParser.new(spec_format)
end
it "should warn about teaser matching problems" do
@log_parser.should_receive(:warn).with(:teaser_check_failed, anything).exactly(5).times
@log_parser.parse_file(log_fixture(:test_file_format))
\ No newline at end of file