spec/request_spec.rb in wvanbergen-request-log-analyzer-0.3.4 vs spec/request_spec.rb in wvanbergen-request-log-analyzer-1.0.0

- old
+ new

@@ -1,11 +1,13 @@ require File.dirname(__FILE__) + '/spec_helper' describe RequestLogAnalyzer::Request, :single_line do + include RequestLogAnalyzerSpecHelper + before(:each) do - @single_line_request = RequestLogAnalyzer::Request.new(TestFileFormat) + @single_line_request = RequestLogAnalyzer::Request.new(spec_format) @single_line_request << { :line_type => :test, :lineno => 1, :test_capture => 'awesome!' } end it "should include the file format module" do (class << @single_line_request; self; end).ancestors.include?(TestFileFormat) @@ -36,11 +38,13 @@ end describe RequestLogAnalyzer::Request, :combined do + include RequestLogAnalyzerSpecHelper + before(:each) do - @combined_request = RequestLogAnalyzer::Request.new(TestFileFormat) + @combined_request = RequestLogAnalyzer::Request.new(spec_format) @combined_request << { :line_type => :first, :lineno => 1, :name => 'first line!' } @combined_request << { :line_type => :test, :lineno => 4, :test_capture => 'testing' } @combined_request << { :line_type => :test, :lineno => 7, :test_capture => 'testing some more' } @combined_request << { :line_type => :last, :lineno => 10, :time => 0.03 } end \ No newline at end of file