diff --git a/Rakefile b/Rakefile index 3f553b6..d341d88 100644 --- a/Rakefile +++ b/Rakefile @@ -85,6 +85,15 @@ task "spec:jruby" do system "jruby -S rake spec" end +desc "Run each spec in isolation to test for dependency issues" +task :spec_deps do + Dir["spec/**/*_spec.rb"].each do |test| + if !system("spec #{test} &> /dev/null") + puts "Dependency Issues: #{test}" + end + end +end + task :default => :spec task :precommit => ["spec", "spec:jruby"] \ No newline at end of file diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 1ddf33a..dda32c9 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -7,11 +7,12 @@ begin require "redgreen" unless ENV['TM_CURRENT_LINE']; rescue LoadError; end webrat_path = File.expand_path(File.dirname(__FILE__) + "/../lib/") $LOAD_PATH.unshift(webrat_path) unless $LOAD_PATH.include?(webrat_path) +require "merb-core" +require "webrat/merb" + require "webrat" require File.expand_path(File.dirname(__FILE__) + "/fakes/test_session") -require "merb-core" - Spec::Runner.configure do |config| include Webrat::Methods