diff --git a/test/unit/vagrant/command/base_test.rb b/test/unit/vagrant/command/base_test.rb index 1088a2de1..7fdb95176 100644 --- a/test/unit/vagrant/command/base_test.rb +++ b/test/unit/vagrant/command/base_test.rb @@ -38,10 +38,10 @@ describe Vagrant::Command::Base do end end - it "returns nil if invalid options are given" do + it "raises an error if invalid options are given" do instance = klass.new(["-f"], nil) - instance.should_receive(:puts) - instance.parse_options(OptionParser.new).should be_nil + expect { instance.parse_options(OptionParser.new) }. + to raise_error(Vagrant::Errors::CLIInvalidOptions) end end