lib/foodtaster/rspec/example_methods.rb in foodtaster-0.0.6 vs lib/foodtaster/rspec/example_methods.rb in foodtaster-0.0.7
- old
+ new
@@ -1,9 +1,11 @@
module Foodtaster
module RSpec
module ExampleMethods
def get_vm(vm_name)
- Foodtaster::Vm.get(vm_name)
+ Foodtaster::Vm.get(vm_name).tap do |vm|
+ vm.prepare unless vm.prepared?
+ end
end
def run_chef_on(vm_name, &block)
chef_config = ChefConfig.new.tap{ |conf| block.call(conf) }.to_hash
@previous_chef_config = chef_config