Fix rspec tests

This commit is contained in:
Brian Cain 2018-03-19 10:56:09 -07:00
parent d0d69e59c9
commit 42419bbd49
No known key found for this signature in database
GPG Key ID: 43D51080D357A001
5 changed files with 6 additions and 7 deletions

View File

@ -1,5 +1,4 @@
require "set"
require 'pry'
require "vagrant/config/v2/util"

View File

@ -1,5 +1,4 @@
require "vagrant"
require 'pry'
require_relative "ssh_connect"

View File

@ -1,5 +1,4 @@
require "vagrant"
require 'pry'
require File.expand_path("../vm_trigger", __FILE__)

View File

@ -1,5 +1,5 @@
require 'log4r'
require 'pry'
require Vagrant.source_root.join('plugins/provisioners/shell/config')
module VagrantPlugins

View File

@ -5,20 +5,22 @@ require Vagrant.source_root.join("plugins/kernel_v2/config/vm_trigger")
describe VagrantPlugins::Kernel_V2::VagrantConfigTrigger do
include_context "unit"
subject { described_class.new }
let(:command) { :up }
subject { described_class.new(command) }
let(:machine) { double("machine") }
def assert_invalid
errors = subject.validate(machine)
if !errors.values.any? { |v| !v.empty? }
if !errors.empty? { |v| !v.empty? }
raise "No errors: #{errors.inspect}"
end
end
def assert_valid
errors = subject.validate(machine)
if !errors.values.all? { |v| v.empty? }
if !errors.empty? { |v| v.empty? }
raise "Errors: #{errors.inspect}"
end
end