Methods
T
Included Modules
Instance Public methods
test_environment_with_rack_env()
# File railties/test/commands/server_test.rb, line 38
def test_environment_with_rack_env
  with_rails_env nil do
    with_rack_env 'production' do
      server = Rails::Server.new
      assert_equal 'production', server.options[:environment]
    end
  end
end
test_environment_with_rails_env()
# File railties/test/commands/server_test.rb, line 29
def test_environment_with_rails_env
  with_rack_env nil do
    with_rails_env 'production' do
      server = Rails::Server.new
      assert_equal 'production', server.options[:environment]
    end
  end
end
test_environment_with_server_option()
# File railties/test/commands/server_test.rb, line 8
def test_environment_with_server_option
  args    = ["thin", "-e", "production"]
  options = Rails::Server::Options.new.parse!(args)
  assert_equal 'production', options[:environment]
  assert_equal 'thin', options[:server]
end
test_environment_without_server_option()
# File railties/test/commands/server_test.rb, line 15
def test_environment_without_server_option
  args    = ["-e", "production"]
  options = Rails::Server::Options.new.parse!(args)
  assert_equal 'production', options[:environment]
  assert_nil options[:server]
end
test_log_stdout()
# File railties/test/commands/server_test.rb, line 47
def test_log_stdout
  with_rack_env nil do
    with_rails_env nil do
      args    = []
      options = Rails::Server::Options.new.parse!(args)
      assert_equal true, options[:log_stdout]

      args    = ["-e", "development"]
      options = Rails::Server::Options.new.parse!(args)
      assert_equal true, options[:log_stdout]

      args    = ["-e", "production"]
      options = Rails::Server::Options.new.parse!(args)
      assert_equal false, options[:log_stdout]

      with_rack_env 'development' do
        args    = []
        options = Rails::Server::Options.new.parse!(args)
        assert_equal true, options[:log_stdout]
      end

      with_rack_env 'production' do
        args    = []
        options = Rails::Server::Options.new.parse!(args)
        assert_equal false, options[:log_stdout]
      end

      with_rails_env 'development' do
        args    = []
        options = Rails::Server::Options.new.parse!(args)
        assert_equal true, options[:log_stdout]
      end

      with_rails_env 'production' do
        args    = []
        options = Rails::Server::Options.new.parse!(args)
        assert_equal false, options[:log_stdout]
      end
    end
  end
end
test_server_option_without_environment()
# File railties/test/commands/server_test.rb, line 22
def test_server_option_without_environment
  args    = ["thin"]
  options = Rails::Server::Options.new.parse!(args)
  assert_nil options[:environment]
  assert_equal 'thin', options[:server]
end