diff options
Diffstat (limited to 'railties/lib/tasks/testing.rake')
-rw-r--r-- | railties/lib/tasks/testing.rake | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/railties/lib/tasks/testing.rake b/railties/lib/tasks/testing.rake index 6d846e1cc0..6fedcdb7e3 100644 --- a/railties/lib/tasks/testing.rake +++ b/railties/lib/tasks/testing.rake @@ -13,8 +13,13 @@ end desc 'Test all units and functionals' task :test do - Rake::Task["test:units"].invoke rescue got_error = true + Rake::Task["test:units"].invoke rescue got_error = true Rake::Task["test:functionals"].invoke rescue got_error = true + + if File.exist?("test/integration") + Rake::Task["test:integration"].invoke rescue got_error = true + end + raise "Test failures" if got_error end @@ -45,6 +50,13 @@ namespace :test do t.verbose = true end + desc "Run the integration tests in test/integration" + Rake::TestTask.new(:integration => "db:test:prepare") do |t| + t.libs << "test" + t.pattern = 'test/integration/**/*_test.rb' + t.verbose = true + end + desc "Run the plugin tests in vendor/plugins/**/test (or specify with PLUGIN=name)" Rake::TestTask.new(:plugins => :environment) do |t| t.libs << "test" |