spec/spec_helper.rb in request-log-analyzer-1.2.1 vs spec/spec_helper.rb in request-log-analyzer-1.2.3
- old
+ new
@@ -1,15 +1,24 @@
$:.reject! { |e| e.include? 'TextMate' }
$: << File.join(File.dirname(__FILE__), '..', 'lib')
require 'rubygems'
-require 'spec'
+require 'spec/autorun'
require 'request_log_analyzer'
module RequestLogAnalyzer::Spec
end
-require File.dirname(__FILE__) + '/lib/testing_format'
-require File.dirname(__FILE__) + '/lib/mocks'
-require File.dirname(__FILE__) + '/lib/helper'
+# Include all files in the spec_helper directory
+Dir[File.dirname(__FILE__) + "/lib/**/*.rb"].each do |file|
+ require file
+end
Dir.mkdir("#{File.dirname(__FILE__)}/../tmp") unless File.exist?("#{File.dirname(__FILE__)}/../tmp")
+
+Spec::Runner.configure do |config|
+ config.include RequestLogAnalyzer::Spec::Matchers
+ config.include RequestLogAnalyzer::Spec::Mocks
+ config.include RequestLogAnalyzer::Spec::Helpers
+
+ config.extend RequestLogAnalyzer::Spec::Macros
+end