diff options
Diffstat (limited to 'railties/test/application/rake_test.rb')
-rw-r--r-- | railties/test/application/rake_test.rb | 17 |
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 |