Skip to content

Commit

Permalink
Merge pull request #30883 from PHedkvist/add_daemon_command_test
Browse files Browse the repository at this point in the history
Added test case for starting rails with daemon option
  • Loading branch information
kamipo committed Oct 13, 2017
2 parents 6419db3 + edf167e commit 87edd72
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions railties/test/commands/server_test.rb
Expand Up @@ -22,6 +22,18 @@ def test_environment_without_server_option
assert_nil options[:server]
end

def test_server_option_with_daemon
args = ["-d"]
options = parse_arguments(args)
assert_equal true, options[:daemonize]
end

def test_server_option_without_daemon
args = []
options = parse_arguments(args)
assert_equal false, options[:daemonize]
end

def test_server_option_without_environment
args = ["thin"]
with_rack_env nil do
Expand Down

0 comments on commit 87edd72

Please sign in to comment.