diff --git a/test/test_cli.rb b/test/test_cli.rb index 1a6de6cc..c9e4e5f3 100644 --- a/test/test_cli.rb +++ b/test/test_cli.rb @@ -133,19 +133,6 @@ class TestCLI < Test::Unit::TestCase assert m, "'#{url}' is not a URL" end - end # JRUBY or Windows - - def test_state - url = "tcp://127.0.0.1:8232" - cli = Puma::CLI.new ["--state", @tmp_path, "--control", url] - cli.send(:parse_options) - cli.write_state - - data = YAML.load File.read(@tmp_path) - - assert_equal Process.pid, data["pid"] - assert_equal url, data["config"].options[:control_url] - end def test_state_file_callback_filtering cli = Puma::CLI.new [ "--config", "test/config/state_file_testing_config.rb", @@ -162,6 +149,20 @@ class TestCLI < Test::Unit::TestCase assert_empty keys_not_stripped end + end # JRUBY or Windows + + def test_state + url = "tcp://127.0.0.1:8232" + cli = Puma::CLI.new ["--state", @tmp_path, "--control", url] + cli.send(:parse_options) + cli.write_state + + data = YAML.load File.read(@tmp_path) + + assert_equal Process.pid, data["pid"] + assert_equal url, data["config"].options[:control_url] + end + def test_load_path cli = Puma::CLI.new ["--include", 'foo/bar'] cli.send(:parse_options)