Method: ChefSpec::Librarian#teardown!

Defined in:
lib/chefspec/librarian.rb

#teardown!Object

Remove the temporary directory and restore the librarian-chef cookbook path.



39
40
41
42
43
44
# File 'lib/chefspec/librarian.rb', line 39

def teardown!
  env = ::Librarian::Chef::Environment.new(project_path: Dir.pwd)
  env.config_db.local["path"] = @originalpath

  FileUtils.rm_rf(@tmpdir) if File.exist?(@tmpdir)
end