aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-08-24 12:11:36 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-08-24 12:11:36 -0300
commit1c1ad2b74600579e255bcb34e9926de2a76ac61a (patch)
treec9884dd7adcbe46c031771d7d43e1e6317232a68 /railties/test
parent35161a7f5397f564d895525eddead142aca7fbe3 (diff)
parent306c14c41135dc8d308967821d0bb26cf4bb7ecd (diff)
downloadrails-1c1ad2b74600579e255bcb34e9926de2a76ac61a.tar.gz
rails-1c1ad2b74600579e255bcb34e9926de2a76ac61a.tar.bz2
rails-1c1ad2b74600579e255bcb34e9926de2a76ac61a.zip
Merge pull request #21267 from davidcornu/rails-server-port-env-var
Use the PORT environment variable for rails server
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/commands/server_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/railties/test/commands/server_test.rb b/railties/test/commands/server_test.rb
index 7a063aeddf..3be4a74f74 100644
--- a/railties/test/commands/server_test.rb
+++ b/railties/test/commands/server_test.rb
@@ -44,6 +44,13 @@ class Rails::ServerTest < ActiveSupport::TestCase
end
end
+ def test_environment_with_port
+ switch_env "PORT", "1234" do
+ server = Rails::Server.new
+ assert_equal 1234, server.options[:Port]
+ end
+ end
+
def test_caching_without_option
args = []
options = Rails::Server::Options.new.parse!(args)