- From: Jamie Winsor <
>
- To: "
" <
>
- Cc: "
" <
>
- Subject: [chef] Re: Chefspec + Berksfile - Cookbook not found
- Date: Mon, 19 Nov 2012 06:21:15 -0800
Hey Cassiano,
It looks like you're attempting to test on your own machine - this will be a
problem. We generally use Vagrant virtual machines to test our cookbooks.
The reason your cookbook is not found is because the cookbook_path attribute
in your machines Knife config does not contain the path to the cookbook you
are testing.
Berkshelf will automatically make the cookbooks acailable to your Vagrant VM
so you could run your specs within the Vagrant VM.
There is also the Test-Kitchen approach which I would recommend you looking
into!
Jamie Winsor
@resetexistence
On Nov 19, 2012, at 5:53 AM, Cassiano Leal
<
>
wrote:
>
Ohai Chefs,
>
>
I'm trying to TDD a cookbook for my company's website. I'm using Berksfile
>
to manage cookbook dependencies and I'm trying to get Chefspec to work.
>
>
Converging the cookbook on a VM works just fine, but when I run rspec I get
>
a Cookbook not found error.
>
>
There's additional information on this gist: https://gist.github.com/4072082
>
>
Do I need to require something from berkshelf in the specs? I tried
>
including require 'berkshelf' at the top of the recipe to no avail.
>
>
Appreciate your thoughts/guidance.
>
>
Thanks!
>
--
>
Cassiano Leal
>
Archive powered by MHonArc 2.6.16.