Add "rake spec_deps" task to test specs for dependency issues and correct some issues
This commit is contained in:
parent
ba0e50104b
commit
97bb64f4f9
9
Rakefile
9
Rakefile
|
@ -85,6 +85,15 @@ task "spec:jruby" do
|
||||||
system "jruby -S rake spec"
|
system "jruby -S rake spec"
|
||||||
end
|
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 :default => :spec
|
||||||
|
|
||||||
task :precommit => ["spec", "spec:jruby"]
|
task :precommit => ["spec", "spec:jruby"]
|
|
@ -7,11 +7,12 @@ begin require "redgreen" unless ENV['TM_CURRENT_LINE']; rescue LoadError; end
|
||||||
webrat_path = File.expand_path(File.dirname(__FILE__) + "/../lib/")
|
webrat_path = File.expand_path(File.dirname(__FILE__) + "/../lib/")
|
||||||
$LOAD_PATH.unshift(webrat_path) unless $LOAD_PATH.include?(webrat_path)
|
$LOAD_PATH.unshift(webrat_path) unless $LOAD_PATH.include?(webrat_path)
|
||||||
|
|
||||||
|
require "merb-core"
|
||||||
|
require "webrat/merb"
|
||||||
|
|
||||||
require "webrat"
|
require "webrat"
|
||||||
require File.expand_path(File.dirname(__FILE__) + "/fakes/test_session")
|
require File.expand_path(File.dirname(__FILE__) + "/fakes/test_session")
|
||||||
|
|
||||||
require "merb-core"
|
|
||||||
|
|
||||||
Spec::Runner.configure do |config|
|
Spec::Runner.configure do |config|
|
||||||
include Webrat::Methods
|
include Webrat::Methods
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue