diff options
author | Evgeny Vlasenko <mahnunchik@gmail.com> | 2016-07-05 00:36:39 +0600 |
---|---|---|
committer | Evgeny Vlasenko <mahnunchik@gmail.com> | 2016-07-05 00:36:39 +0600 |
commit | e17d7275f49a7286439d972f01b0fb42331dcdb7 (patch) | |
tree | e9f54cd41f1b204ff6288e0dcdb2edb748af0b65 /railties/test | |
parent | 9552f8b457a674c66f99d6cbef244fbb7de6ba34 (diff) | |
download | rails-e17d7275f49a7286439d972f01b0fb42331dcdb7.tar.gz rails-e17d7275f49a7286439d972f01b0fb42331dcdb7.tar.bz2 rails-e17d7275f49a7286439d972f01b0fb42331dcdb7.zip |
Use the HOST environment variable for rails server #25677
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/commands/server_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/railties/test/commands/server_test.rb b/railties/test/commands/server_test.rb index 38a1605d1f..b9a48bbf98 100644 --- a/railties/test/commands/server_test.rb +++ b/railties/test/commands/server_test.rb @@ -51,6 +51,13 @@ class Rails::ServerTest < ActiveSupport::TestCase end end + def test_environment_with_host + switch_env "HOST", "1.2.3.4" do + server = Rails::Server.new + assert_equal "1.2.3.4", server.options[:Host] + end + end + def test_caching_without_option args = [] options = Rails::Server::Options.new.parse!(args) |