diff options
Diffstat (limited to 'railties/test/commands/server_test.rb')
-rw-r--r-- | railties/test/commands/server_test.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/railties/test/commands/server_test.rb b/railties/test/commands/server_test.rb index 4a3ea82e3d..cb57b3c0cd 100644 --- a/railties/test/commands/server_test.rb +++ b/railties/test/commands/server_test.rb @@ -1,7 +1,9 @@ require 'abstract_unit' +require 'env_helpers' require 'rails/commands/server' class Rails::ServerTest < ActiveSupport::TestCase + include EnvHelpers def test_environment_with_server_option args = ["thin", "-e", "production"] @@ -23,4 +25,18 @@ class Rails::ServerTest < ActiveSupport::TestCase assert_nil options[:environment] assert_equal 'thin', options[:server] end + + def test_environment_with_rails_env + with_rails_env 'production' do + server = Rails::Server.new + assert_equal 'production', server.options[:environment] + end + end + + def test_environment_with_rack_env + with_rack_env 'production' do + server = Rails::Server.new + assert_equal 'production', server.options[:environment] + end + end end |