Sha256: fc4927692a91cd982f45b3edaf1b77042f0e70424492e55c056efbd48bb5f259
Contents?: true
Size: 538 Bytes
Versions: 3
Compression:
Stored size: 538 Bytes
Contents
module Foodtaster module RSpec module DslMethods def require_vm(vm_name) define_method(vm_name) { get_vm(vm_name) } before(:all) { get_vm(vm_name) } end def run_chef_on(vm_name, options = {}, &block) require_vm(vm_name) rollback = options.key?(:rollback) ? options[:rollback] : !Foodtaster.config.skip_rollback before(:all) do vm = get_vm(vm_name) vm.rollback if rollback run_chef_on(vm_name, &block) end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
foodtaster-0.0.10 | lib/foodtaster/rspec/dsl_methods.rb |
foodtaster-0.0.9 | lib/foodtaster/rspec/dsl_methods.rb |
foodtaster-0.0.8 | lib/foodtaster/rspec/dsl_methods.rb |