core: helper to get the server URL
This commit is contained in:
parent
7b8002eba7
commit
f9fe025d10
|
@ -8,6 +8,14 @@ module Vagrant
|
|||
!ENV["VAGRANT_NO_PLUGINS"]
|
||||
end
|
||||
|
||||
# Returns the URL prefix to the server.
|
||||
#
|
||||
# @return [String]
|
||||
def self.server_url
|
||||
# TODO: default
|
||||
ENV["VAGRANT_SERVER_URL"]
|
||||
end
|
||||
|
||||
# The source root is the path to the root directory of the Vagrant source.
|
||||
#
|
||||
# @return [Pathname]
|
||||
|
|
|
@ -22,6 +22,14 @@ describe Vagrant do
|
|||
end
|
||||
end
|
||||
|
||||
describe "#server_url" do
|
||||
it "is the VAGRANT_SERVER_URL value" do
|
||||
with_temp_env("VAGRANT_SERVER_URL" => "foo") do
|
||||
expect(subject.server_url).to eq("foo")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "#user_data_path" do
|
||||
around do |example|
|
||||
env = {
|
||||
|
|
Loading…
Reference in New Issue