diff options
Diffstat (limited to 'railties/test/application/runner_test.rb')
-rw-r--r-- | railties/test/application/runner_test.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/railties/test/application/runner_test.rb b/railties/test/application/runner_test.rb index 1c4aa1d4c4..4dc766dfda 100644 --- a/railties/test/application/runner_test.rb +++ b/railties/test/application/runner_test.rb @@ -74,13 +74,15 @@ module ApplicationTests end def test_runner_detects_syntax_errors - Dir.chdir(app_path) { `bin/rails runner "puts 'hello world" 2>&1` } - refute $?.success? + output = Dir.chdir(app_path) { `bin/rails runner "puts 'hello world" 2>&1` } + assert_not $?.success? + assert_match "unterminated string meets end of file", output end def test_runner_detects_bad_script_name - Dir.chdir(app_path) { `bin/rails runner "iuiqwiourowe" 2>&1` } - refute $?.success? + output = Dir.chdir(app_path) { `bin/rails runner "iuiqwiourowe" 2>&1` } + assert_not $?.success? + assert_match "undefined local variable or method `iuiqwiourowe' for main:Object", output end def test_environment_with_rails_env |