aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2018-03-05 08:02:04 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2018-03-05 08:02:04 +0900
commit968c499aca5ca71dc909ba7a632c5dbc4f58b101 (patch)
tree350fd05a3ede0db1c7854c62ddd346e82217df7c /railties/test
parent4ed4c75c1fafd00646108771dedddeb1498796d8 (diff)
downloadrails-968c499aca5ca71dc909ba7a632c5dbc4f58b101.tar.gz
rails-968c499aca5ca71dc909ba7a632c5dbc4f58b101.tar.bz2
rails-968c499aca5ca71dc909ba7a632c5dbc4f58b101.zip
Fix "NameError: undefined local variable or method `host'"
The `host` and `port` can't use this context.
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/commands/server_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/test/commands/server_test.rb b/railties/test/commands/server_test.rb
index c84be439e4..467afe7cea 100644
--- a/railties/test/commands/server_test.rb
+++ b/railties/test/commands/server_test.rb
@@ -239,6 +239,12 @@ class Rails::Command::ServerCommandTest < ActiveSupport::TestCase
ARGV.replace original_args
end
+ def test_served_url
+ args = %w(-u webrick -b 127.0.0.1 -p 4567)
+ server = Rails::Server.new(parse_arguments(args))
+ assert_equal "http://127.0.0.1:4567", server.served_url
+ end
+
private
def run_command(*args)
build_app