From 76266a818449c732440e7e2ef4de8442ac6af891 Mon Sep 17 00:00:00 2001 From: rohit Date: Thu, 16 Sep 2010 09:32:33 +0530 Subject: Fix output of 'rails runner --help' [#4249 state:open] --- railties/test/application/runner_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'railties/test') 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 -- cgit v1.2.3