aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-10-14 07:08:22 +0900
committerGitHub <noreply@github.com>2017-10-14 07:08:22 +0900
commit87edd722739b8ffa562426dcdfed8fca9d8470dd (patch)
treefbc36a94e3c32b56faca82ac72ecd36855340176
parent6419db33383b750d0033f37588699df43a8fe419 (diff)
parentedf167e84829e505b89e32f6ef4987f720f19627 (diff)
downloadrails-87edd722739b8ffa562426dcdfed8fca9d8470dd.tar.gz
rails-87edd722739b8ffa562426dcdfed8fca9d8470dd.tar.bz2
rails-87edd722739b8ffa562426dcdfed8fca9d8470dd.zip
Merge pull request #30883 from PHedkvist/add_daemon_command_test
Added test case for starting rails with daemon option
-rw-r--r--railties/test/commands/server_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/railties/test/commands/server_test.rb b/railties/test/commands/server_test.rb
index a6201e4f04..60bb8ca1db 100644
--- a/railties/test/commands/server_test.rb
+++ b/railties/test/commands/server_test.rb
@@ -22,6 +22,18 @@ class Rails::ServerTest < ActiveSupport::TestCase
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