Add JRuby to "rake multiruby"

This commit is contained in:
Bryan Helmkamp 2009-06-15 00:46:56 -04:00
parent 953d35b65a
commit b4ae28c48c

View File

@ -90,32 +90,43 @@ desc "Run everything against multiruby"
task :multiruby do task :multiruby do
result = system "multiruby -S rake spec" result = system "multiruby -S rake spec"
raise "Multiruby tests failed" unless result raise "Multiruby tests failed" unless result
result = system "jruby -S rake spec"
raise "JRuby tests failed" unless result
Dir.chdir "spec/integration/rails" do Dir.chdir "spec/integration/rails" do
result = system "multiruby -S rake test_unit:rails" result = system "multiruby -S rake test_unit:rails"
raise "Rails integration tests failed" unless result raise "Rails integration tests failed" unless result
result = system "jruby -S rake test_unit:rails"
raise "Rails integration tests failed" unless result
end end
Dir.chdir "spec/integration/merb" do Dir.chdir "spec/integration/merb" do
result = system "multiruby -S rake spec" result = system "multiruby -S rake spec"
raise "Merb integration tests failed" unless result raise "Merb integration tests failed" unless result
result = system "jruby -S rake spec"
raise "Rails integration tests failed" unless result
end end
Dir.chdir "spec/integration/sinatra" do Dir.chdir "spec/integration/sinatra" do
result = system "multiruby -S rake test" result = system "multiruby -S rake test"
raise "Sinatra integration tests failed" unless result raise "Sinatra integration tests failed" unless result
result = system "jruby -S rake test"
raise "Sinatra integration tests failed" unless result
end end
Dir.chdir "spec/integration/rack" do Dir.chdir "spec/integration/rack" do
result = system "multiruby -S rake test" result = system "multiruby -S rake test"
raise "Rack integration tests failed" unless result raise "Rack integration tests failed" unless result
end
result = system "jruby -S rake test"
raise "Rack integration tests failed" unless result
end end
desc "Run specs using jruby" puts
task "spec:jruby" do puts "Multiruby OK!"
result = system "jruby -S rake spec"
raise "JRuby tests failed" unless result
end end
desc "Run each spec in isolation to test for dependency issues" desc "Run each spec in isolation to test for dependency issues"
@ -183,8 +194,6 @@ end
task :default => :spec task :default => :spec
task :precommit => ["spec", "spec:jruby", "spec:integration"]
desc 'Removes trailing whitespace' desc 'Removes trailing whitespace'
task :whitespace do task :whitespace do
sh %{find . -name '*.rb' -exec sed -i '' 's/ *$//g' {} \\;} sh %{find . -name '*.rb' -exec sed -i '' 's/ *$//g' {} \\;}