aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/commands/server_test.rb
diff options
context:
space:
mode:
authorPierre Hedkvist <pierre.hedkvist@gmail.com>2017-10-13 13:21:11 +0000
committerPierre Hedkvist <pierre.hedkvist@gmail.com>2017-10-13 13:21:11 +0000
commitedf167e84829e505b89e32f6ef4987f720f19627 (patch)
treeabc9118fb9e40c3439928f949ffa58a8e12263c2 /railties/test/commands/server_test.rb
parent29da7d1ff510a9f376fc6c780273dfa89298ff51 (diff)
downloadrails-edf167e84829e505b89e32f6ef4987f720f19627.tar.gz
rails-edf167e84829e505b89e32f6ef4987f720f19627.tar.bz2
rails-edf167e84829e505b89e32f6ef4987f720f19627.zip
Added test case for starting rails with daemon option, this should set the option[:daemonize] to true, otherwise the option[:daemonize] will be set to false
Diffstat (limited to 'railties/test/commands/server_test.rb')
-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