diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2018-11-19 09:34:51 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-19 09:34:51 -0800 |
commit | 317bf45c24e6d78ec5349eadd2683aca7e7fe7e8 (patch) | |
tree | f004cca7d93975c818ad81bfd8a290288ec6a6ac /railties | |
parent | ed79e52ad213de6bf4008c07d9d091ec59d34b60 (diff) | |
parent | 90266a7f1eff7c873cba7044fa0a4487b2a6ff84 (diff) | |
download | rails-317bf45c24e6d78ec5349eadd2683aca7e7fe7e8.tar.gz rails-317bf45c24e6d78ec5349eadd2683aca7e7fe7e8.tar.bz2 rails-317bf45c24e6d78ec5349eadd2683aca7e7fe7e8.zip |
Merge pull request #34476 from y-yagi/fix_no_method_error_in_parallelization
Correctly handle unknown object in parallel tests
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/application/test_runner_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/railties/test/application/test_runner_test.rb b/railties/test/application/test_runner_test.rb index 0d7645e794..140703e118 100644 --- a/railties/test/application/test_runner_test.rb +++ b/railties/test/application/test_runner_test.rb @@ -586,6 +586,20 @@ module ApplicationTests assert_match "1 runs, 0 assertions, 0 failures, 1 errors", output end + def test_run_in_parallel_with_unknown_object + create_scaffold + app_file "config/environments/test.rb", <<-RUBY + Rails.application.configure do + config.action_controller.allow_forgery_protection = true + config.action_dispatch.show_exceptions = false + end + RUBY + + output = run_test_command("-n test_should_create_user") + + assert_match "ActionController::InvalidAuthenticityToken", output + end + def test_raise_error_when_specified_file_does_not_exist error = capture(:stderr) { run_test_command("test/not_exists.rb", stderr: true) } assert_match(%r{cannot load such file.+test/not_exists\.rb}, error) |