Add "rake spec_deps" task to test specs for dependency issues and correct some issues

This commit is contained in:
Bryan Helmkamp 2008-11-28 03:11:19 -05:00
parent ba0e50104b
commit 97bb64f4f9
2 changed files with 12 additions and 2 deletions

View File

@ -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"]

View File

@ -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