templates/parent/spec/spec_helper.rb in opskeleton-0.7.1 vs templates/parent/spec/spec_helper.rb in opskeleton-0.7.2

- old
+ new

@@ -6,19 +6,20 @@ include SpecInfra::Helper::DetectOS def run(cmd) unless(system(cmd, out: $stdout, err: :out)) puts 'Failed to setup vagrant machine' - System.exit 1 + exit 1 end end RSpec.configure do |c| c.before :suite do c.host = ENV['TARGET_HOST'] c.ssh.close if c.ssh options = Net::SSH::Config.for(c.host) if(!ENV['LOCAL']) + run("vagrant destroy #{c.host} -f") run("vagrant up #{c.host}") config = `vagrant ssh-config #{c.host}` sshhost = sshuser = '' if config != '' config.each_line do |line|