Add coverage on vagrantfile_name stubbing behavior
This commit is contained in:
parent
1cd8a4b9be
commit
564dff651e
|
@ -121,7 +121,10 @@ describe "vagrant bin" do
|
|||
context "plugin commands" do
|
||||
let(:argv) { ["plugin"] }
|
||||
|
||||
before { allow(ENV).to receive(:[]=) }
|
||||
before do
|
||||
allow(ENV).to receive(:[]=)
|
||||
allow(ENV).to receive(:[])
|
||||
end
|
||||
|
||||
it "should unset vagrantfile" do
|
||||
expect(Vagrant::Environment).to receive(:new).
|
||||
|
@ -152,5 +155,14 @@ describe "vagrant bin" do
|
|||
with(hash_excluding(vagrantfile_name: "")).and_return(env)
|
||||
end
|
||||
end
|
||||
|
||||
context "with VAGRANT_LOCAL_PLUGINS_LOAD enabled" do
|
||||
before { expect(ENV).to receive(:[]).with("VAGRANT_LOCAL_PLUGINS_LOAD").and_return("1") }
|
||||
|
||||
it "should not unset vagrantfile" do
|
||||
expect(Vagrant::Environment).to receive(:new).
|
||||
with(hash_excluding(vagrantfile_name: "")).and_return(env)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue