aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/tasks/testing.rake
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2006-02-28 18:57:32 +0000
committerJamis Buck <jamis@37signals.com>2006-02-28 18:57:32 +0000
commit1a91abe6450b5bcb2a7fe1de1494b12c34288e50 (patch)
tree7f9b9f0c938c4241f09dea1201c318fb3967d648 /railties/lib/tasks/testing.rake
parent9507f5dcc90e22a6355d048f7fe00476e852889f (diff)
downloadrails-1a91abe6450b5bcb2a7fe1de1494b12c34288e50.tar.gz
rails-1a91abe6450b5bcb2a7fe1de1494b12c34288e50.tar.bz2
rails-1a91abe6450b5bcb2a7fe1de1494b12c34288e50.zip
Add integration test support to app generation and testing
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3702 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/tasks/testing.rake')
-rw-r--r--railties/lib/tasks/testing.rake14
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"