spec/unit/source/log_parser_spec.rb in wvanbergen-request-log-analyzer-1.2.1 vs spec/unit/source/log_parser_spec.rb in wvanbergen-request-log-analyzer-1.2.3
- old
+ new
@@ -1,9 +1,8 @@
require File.dirname(__FILE__) + '/../../spec_helper'
describe RequestLogAnalyzer::Source::LogParser, :requests do
- include RequestLogAnalyzer::Spec::Helper
before(:each) do
@log_parser = RequestLogAnalyzer::Source::LogParser.new(testing_format)
end
@@ -40,16 +39,19 @@
request.should be_kind_of(RequestLogAnalyzer::Request)
request.should =~ :test
request[:test_capture].should_not be_nil
end
io.close
- end
+ end
+ it "should parse a request that only consists of one line" do
+ @log_parser.parse_file(log_fixture(:header_and_footer))
+ @log_parser.parsed_requests.should == 2
+ end
end
describe RequestLogAnalyzer::Source::LogParser, :warnings do
- include RequestLogAnalyzer::Spec::Helper
before(:each) do
@log_parser = RequestLogAnalyzer::Source::LogParser.new(testing_format, :parse_strategy => 'cautious')
end
@@ -65,10 +67,9 @@
@log_parser.parse_file(log_fixture(:test_order))
end
end
describe RequestLogAnalyzer::Source::LogParser, :decompression do
- include RequestLogAnalyzer::Spec::Helper
before(:each) do
@log_parser = RequestLogAnalyzer::Source::LogParser.new(RequestLogAnalyzer::FileFormat::Rails.new)
end
\ No newline at end of file