Class: Cheffish::RSpec::RecipeRunWrapper

Inherits:
ChefRunWrapper
  • Object
show all
Defined in:
lib/cheffish/rspec/recipe_run_wrapper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(chef_config, &recipe) ⇒ RecipeRunWrapper

Returns a new instance of RecipeRunWrapper.



6
7
8
9
# File 'lib/cheffish/rspec/recipe_run_wrapper.rb', line 6

def initialize(chef_config, &recipe)
  super(chef_config)
  @recipe = recipe
end

Instance Attribute Details

#recipeObject (readonly)

Returns the value of attribute recipe.



11
12
13
# File 'lib/cheffish/rspec/recipe_run_wrapper.rb', line 11

def recipe
  @recipe
end

Instance Method Details

#clientObject



13
14
15
16
17
18
19
# File 'lib/cheffish/rspec/recipe_run_wrapper.rb', line 13

def client
  if !@client
    super
    @client.load_block(&recipe)
  end
  @client
end