Module: RSpec::Chef::DefineRecipeGroup
Constant Summary
Constants included
from Matchers
Matchers::CONTAIN_PATTERN
Instance Method Summary
collapse
#lookup_recipe
#json
Methods included from Matchers
#method_missing
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class RSpec::Chef::Matchers
Instance Method Details
#recipe ⇒ Object
12
13
14
15
16
17
18
19
20
|
# File 'lib/rspec-chef/examples/define_recipe_group.rb', line 12
def recipe
::Chef::Config[:solo] = true
::Chef::Config[:cookbook_path] = self.respond_to?(:cookbook_path) ? cookbook_path : RSpec.configuration.cookbook_path
dna = json(self.respond_to?(:json_attributes) ? json_attributes : RSpec.configuration.json_attributes)
cookbook_name = self.class.top_level_description.downcase
lookup_recipe(cookbook_name, ::Chef::Config[:cookbook_path], dna)
end
|
#subject ⇒ Object
8
9
10
|
# File 'lib/rspec-chef/examples/define_recipe_group.rb', line 8
def subject
@recipe ||= recipe
end
|