From 8952168480043335a89ebd1c26d02acc085ab7d2 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Mon, 11 Mar 2019 12:59:18 -0700 Subject: [PATCH] Fix up failing tests --- test/unit/vagrant/cli_test.rb | 7 +++++-- test/unit/vagrant/go_plugin/capability_plugin_test.rb | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/test/unit/vagrant/cli_test.rb b/test/unit/vagrant/cli_test.rb index db7e7e9bd..90839755c 100644 --- a/test/unit/vagrant/cli_test.rb +++ b/test/unit/vagrant/cli_test.rb @@ -30,6 +30,9 @@ describe Vagrant::CLI do describe "#execute" do let(:triggers) { double("triggers") } + before { allow(Vagrant::Util::Experimental).to receive(:feature_enabled?) } + + it "invokes help and exits with 1 if invalid command" do subject = described_class.new(["i-dont-exist"], env) expect(subject).to receive(:help).once @@ -59,7 +62,7 @@ describe Vagrant::CLI do it "fires triggers, if enabled" do allow(Vagrant::Util::Experimental).to receive(:feature_enabled?). - with("typed_triggers").and_return("true") + with("typed_triggers").and_return(true) allow(triggers).to receive(:fire_triggers) commands[:destroy] = [command_lambda("destroy", 42), {}] @@ -76,7 +79,7 @@ describe Vagrant::CLI do it "does not fire triggers if disabled" do allow(Vagrant::Util::Experimental).to receive(:feature_enabled?). - with("typed_triggers").and_return("false") + with("typed_triggers").and_return(false) commands[:destroy] = [command_lambda("destroy", 42), {}] diff --git a/test/unit/vagrant/go_plugin/capability_plugin_test.rb b/test/unit/vagrant/go_plugin/capability_plugin_test.rb index 3db78a50a..2d89bb1f6 100644 --- a/test/unit/vagrant/go_plugin/capability_plugin_test.rb +++ b/test/unit/vagrant/go_plugin/capability_plugin_test.rb @@ -9,7 +9,7 @@ describe Vagrant::GoPlugin::CapabilityPlugin do describe ".interface" do it "should create an interface instance" do - expect(described_class.interface).to be_a(Vagrant::GoPlugin::CapabilityHost::Interface) + expect(described_class.interface).to be_a(Vagrant::GoPlugin::CapabilityPlugin::Interface) end it "should cache generated interface" do