Browse files

rakefile tweaks and refactorings

  • Loading branch information...
1 parent e800e17 commit f56c2441dddb0368a6fbaee55ba41c0089be3641 @flavorjones committed Jul 21, 2010
Showing with 19 additions and 21 deletions.
  1. +1 −4 Rakefile
  2. +18 −17 rails_test/Rakefile
View
5 Rakefile
@@ -20,13 +20,10 @@ end
load "rails_test/Rakefile"
task :gemspec do
- system %q(rake debug_gem | grep -v "^\(in " > loofah.gemspec)
+ system %q(rake debug_gem | grep -v "^\(in " > loofah-activerecord.gemspec)
end
task "test:rails" => :gemspec
-desc "Run test suite and the full Rails regression test suite"
-task "test:all" => [:test, :"test:rails"]
-
task :redocs => :fix_css
task :docs => :fix_css
task :fix_css do
View
35 rails_test/Rakefile
@@ -45,30 +45,31 @@ def test_rails_app dir
end
end
-Dir.chdir(File.dirname(__FILE__)) do
- Dir["rails-*"].sort.each do |dir|
- desc "test #{dir}"
- task "test:#{dir}" do
- Dir.chdir(File.dirname(__FILE__)) do
- setup_rails_app dir
- test_rails_app dir
- end
+def print_results
+ puts "----- RESULTS -----"
+ @results.keys.sort.each do |key|
+ puts "* #{key}: #{@results[key]}"
+ end
+end
+
+Dir["#{File.dirname(__FILE__)}/rails-*"].sort.each do |fqdir|
+ dir = File.basename fqdir
+ desc "test #{dir}"
+ task "test:#{dir}" do
+ Dir.chdir(File.dirname(__FILE__)) do
+ setup_rails_app dir
+ test_rails_app dir
end
end
end
namespace :test do
desc "run tests across various versions of Rails"
task :rails do
- Dir.chdir(File.dirname(__FILE__)) do
- Dir["rails-*"].sort.reverse.each do |dir|
- Rake::Task["test:#{dir}"].invoke
- end
- end
- print_results results
- puts "----- RESULTS -----"
- @results.keys.sort.each do |key|
- puts "* #{key}: #{@results[key]}"
+ Dir["#{File.dirname(__FILE__)}/rails-*"].sort.reverse.each do |fqdir|
+ dir = File.basename fqdir
+ Rake::Task["test:#{dir}"].invoke
end
+ print_results
end
end

0 comments on commit f56c244

Please sign in to comment.