aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application
diff options
context:
space:
mode:
authorrohit <rohit.arondekar@gmail.com>2010-09-16 09:32:33 +0530
committerJosé Valim <jose.valim@gmail.com>2010-09-18 20:49:33 +0200
commit76266a818449c732440e7e2ef4de8442ac6af891 (patch)
treeaffdb5140ad6dcb85f772877dd21996f81bba1a3 /railties/test/application
parent37de59eacf8f6478e866309615af7381d41a5a14 (diff)
downloadrails-76266a818449c732440e7e2ef4de8442ac6af891.tar.gz
rails-76266a818449c732440e7e2ef4de8442ac6af891.tar.bz2
rails-76266a818449c732440e7e2ef4de8442ac6af891.zip
Fix output of 'rails runner --help' [#4249 state:open]
Diffstat (limited to 'railties/test/application')
-rw-r--r--railties/test/application/runner_test.rb5
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