mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Send 'rails runner' help message to stdout instead of stderr.
[#5661 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
This commit is contained in:
parent
88a82bcb2d
commit
fd53bc85e7
2 changed files with 2 additions and 3 deletions
|
@ -17,7 +17,7 @@ ARGV.clone.options do |opts|
|
|||
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 @@ module ApplicationTests
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue