blob: 8039aec873fd0944f8665a794e8b01439d91aa41 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
require 'abstract_unit'
require 'rails/commands/server'
class Rails::ServerTest < ActiveSupport::TestCase
def test_environment_with_server_option
args = ["thin", "RAILS_ENV=production"]
options = Rails::Server::Options.new.parse!(args)
assert_equal 'production', options[:environment]
assert_equal 'thin', options[:server]
end
def test_environment_without_server_option
args = ["RAILS_ENV=production"]
options = Rails::Server::Options.new.parse!(args)
assert_equal 'production', options[:environment]
assert_nil options[:server]
end
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
end
|