Skip to content

Commit

Permalink
Add "rake spec_deps" task to test specs for dependency issues and cor…
Browse files Browse the repository at this point in the history
…rect some issues
  • Loading branch information
brynary committed Nov 28, 2008
1 parent ba0e501 commit 97bb64f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 9 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
5 changes: 3 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
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

Expand Down

0 comments on commit 97bb64f

Please sign in to comment.