sethvargo/chefspec — pull request #433 by flatrocks (2014-05-09 15:58:44+00:00)
Title: Restore original librarian-chef cookbook path

setup! changes the librarian-chef install path (env.config_db.local['path']) to a temp directory for the duration of the test run. teardown! removes the temp directory but does not reset the librarian-chef cookbook path. One result is that, after running chefspec, "librarian-chef install" will install to the previously-used temp directory and the original cookbook location ("cookbooks" by default) becomes out of date and useless. This overwrites even a manual setting in ./librarian/chef/config.

This solution simply remembers the original librarian-chef install path and restores it on teardown.