Methods
- T
-
- test_caching_with_option,
- test_caching_without_option,
- test_default_options,
- test_environment_with_port,
- test_environment_with_rack_env,
- test_environment_with_rails_env,
- test_environment_with_server_option,
- test_environment_without_server_option,
- test_log_stdout,
- test_restart_command_contains_customized_options,
- test_server_option_without_environment
Included Modules
Instance Public methods
test_caching_with_option()
Link
# File railties/test/commands/server_test.rb, line 61 def test_caching_with_option args = ["--dev-caching"] options = Rails::Server::Options.new.parse!(args) assert_equal true, options[:caching] args = ["--no-dev-caching"] options = Rails::Server::Options.new.parse!(args) assert_equal false, options[:caching] end
test_caching_without_option()
Link
test_default_options()
Link
test_environment_with_port()
Link
test_environment_with_rack_env()
Link
test_environment_with_rails_env()
Link
test_environment_with_server_option()
Link
test_environment_without_server_option()
Link
test_log_stdout()
Link
# File railties/test/commands/server_test.rb, line 71 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_restart_command_contains_customized_options()
Link
# File railties/test/commands/server_test.rb, line 122 def test_restart_command_contains_customized_options original_args = ARGV.dup args = ["-p", "4567"] ARGV.replace args options = Rails::Server::Options.new.parse! args server = Rails::Server.new options expected = "bin/rails server -p 4567" assert_equal expected, server.default_options[:restart_cmd] ensure ARGV.replace original_args end
test_server_option_without_environment()
Link