diff options
Diffstat (limited to 'railties/test/application/runner_test.rb')
-rw-r--r-- | railties/test/application/runner_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/railties/test/application/runner_test.rb b/railties/test/application/runner_test.rb index 07a3d94120..7e99ff624d 100644 --- a/railties/test/application/runner_test.rb +++ b/railties/test/application/runner_test.rb @@ -18,6 +18,11 @@ module ApplicationTests MODEL end + def test_should_include_runner_in_shebang_line_in_help + # redirect stderr to stdout as backticks don't capture stderr + assert_match "/rails runner", Dir.chdir(app_path) { `bundle exec rails runner --help 2>&1` } + end + def test_should_run_ruby_statement assert_match "42", Dir.chdir(app_path) { `bundle exec rails runner "puts User.count"` } end |