aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2011-12-21 12:43:41 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2011-12-21 12:44:14 -0700
commit5a4b41443c09c1d1f5c996afe0838391b2e2c5f2 (patch)
tree8a295bc4ad625916d2467a6428bf7f3b9bdcb0f7 /railties/test
parenta29c681dce81d67d0a3307ec91848cb705d20253 (diff)
downloadrails-5a4b41443c09c1d1f5c996afe0838391b2e2c5f2.tar.gz
rails-5a4b41443c09c1d1f5c996afe0838391b2e2c5f2.tar.bz2
rails-5a4b41443c09c1d1f5c996afe0838391b2e2c5f2.zip
Move SubTestTask. Soften up tests.
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/application/rake_test.rb17
1 files changed, 7 insertions, 10 deletions
diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb
index d4d4e4e5ff..1d90671e44 100644
--- a/railties/test/application/rake_test.rb
+++ b/railties/test/application/rake_test.rb
@@ -63,26 +63,23 @@ module ApplicationTests
def test_rake_test_error_output
Dir.chdir(app_path){ `rake db:migrate` }
- app_file "config/database.yml", <<-RUBY
- development:
- RUBY
-
app_file "test/unit/one_unit_test.rb", <<-RUBY
+ raise 'unit'
RUBY
app_file "test/functional/one_functional_test.rb", <<-RUBY
- raise RuntimeError
+ raise 'functional'
RUBY
app_file "test/integration/one_integration_test.rb", <<-RUBY
- raise RuntimeError
+ raise 'integration'
RUBY
silence_stderr do
- output = Dir.chdir(app_path){ `rake test` }
- assert_match(/Errors running test:units! #<ActiveRecord::AdapterNotSpecified/, output)
- assert_match(/Errors running test:functionals! #<RuntimeError/, output)
- assert_match(/Errors running test:integration! #<RuntimeError/, output)
+ output = Dir.chdir(app_path) { `rake test 2>&1` }
+ assert_match 'unit', output
+ assert_match 'functional', output
+ assert_match 'integration', output
end
end