Method: EcomDev::ChefSpec::Configuration#setup!

Defined in:
lib/ecomdev/chefspec/configuration.rb

#setup!Object



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/ecomdev/chefspec/configuration.rb', line 19

def setup!
  unless cookbook_paths.empty?
    original_path = RSpec.configuration.cookbook_path
    if original_path.nil?
      original_path = []
    elsif original_path.is_a?(String)
      original_path = [original_path]
    end

    cookbook_paths.each do |path|
      original_path << path unless original_path.include?(path)
    end

    RSpec.configuration.cookbook_path = original_path
  end

  invoke_callbacks(__method__)
end