提交 fd53bc85 编写于 作者: R rohit 提交者: Santiago Pastorino

Send 'rails runner' help message to stdout instead of stderr.

[#5661 state:committed]
Signed-off-by: NSantiago Pastorino <santiago@wyeworks.com>
上级 88a82bcb
......@@ -17,7 +17,7 @@
opts.separator ""
opts.on("-h", "--help",
"Show this help message.") { $stderr.puts opts; exit }
"Show this help message.") { $stdout.puts opts; exit }
if RbConfig::CONFIG['host_os'] !~ /mswin|mingw/
opts.separator ""
......
......@@ -19,8 +19,7 @@ def self.count
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` }
assert_match "/rails runner", Dir.chdir(app_path) { `bundle exec rails runner --help` }
end
def test_should_run_ruby_statement
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册