test/unit/vagrant/shared_helpers_test.rb in vagrant-unbundled-1.9.7.1 vs test/unit/vagrant/shared_helpers_test.rb in vagrant-unbundled-1.9.8.1
- old
+ new
@@ -16,45 +16,45 @@
end
describe "#in_installer?" do
it "is not if env is not set" do
with_temp_env("VAGRANT_INSTALLER_ENV" => nil) do
- expect(subject.in_installer?).to be_false
+ expect(subject.in_installer?).to be(false)
end
end
it "is if env is set" do
with_temp_env("VAGRANT_INSTALLER_ENV" => "/foo") do
- expect(subject.in_installer?).to be_true
+ expect(subject.in_installer?).to be(true)
end
end
end
describe "#installer_embedded_dir" do
it "returns nil if not in an installer" do
- Vagrant.stub(in_installer?: false)
+ allow(Vagrant).to receive(:in_installer?).and_return(false)
expect(subject.installer_embedded_dir).to be_nil
end
it "returns the set directory" do
- Vagrant.stub(in_installer?: true)
+ allow(Vagrant).to receive(:in_installer?).and_return(true)
with_temp_env("VAGRANT_INSTALLER_EMBEDDED_DIR" => "/foo") do
expect(subject.installer_embedded_dir).to eq("/foo")
end
end
end
describe "#plugins_enabled?" do
it "returns true if the env is not set" do
with_temp_env("VAGRANT_NO_PLUGINS" => nil) do
- expect(subject.plugins_enabled?).to be_true
+ expect(subject.plugins_enabled?).to be(true)
end
end
it "returns false if the env is set" do
with_temp_env("VAGRANT_NO_PLUGINS" => "1") do
- expect(subject.plugins_enabled?).to be_false
+ expect(subject.plugins_enabled?).to be(false)
end
end
end
describe "#server_url" do