There’s some documentation at the end of the ChefSpec readme: https://github.com/sethvargo/chefspec#using-chef-zero. And there’s also a ticket for ChefSpec 3.1.0 to make this integration better. In short, you need to start up a server (which is detailed in the link above), and then setup your Chef config to point to it.
Solutions Engineer, Opscode
From: millisami r millisami r
Reply: firstname.lastname@example.org email@example.com
Date: October 23, 2013 at 3:17:11 AM
To: chef firstname.lastname@example.org
Subject: [chef] Re: Re: test-kitchen and multiple converges
@Ranjib, do you have any post/article on how you do with chefspec and chef-zero?
~Sachin Sagar Rai
Ruby on Rails Developer
On Wed, Oct 23, 2013 at 2:03 AM, Ranjib Dey email@example.com wrote:
sorry for the typo: “I think you can do the same with tk now, with some effort. I dont know…”
On Tue, Oct 22, 2013 at 1:17 PM, Ranjib Dey firstname.lastname@example.org wrote:
yes, you can not do that with chefspec. I test the same, but with lxc & chef zero. I also use a handler to store the updated resources/all resource count. I think you can dont know whats the state of tk, last time i checked it didnt had support for chefserver. If it has now (probably chef-zero support is also there), you can use a handler to store those values, and assert after second convergence.
On Tue, Oct 22, 2013 at 11:45 AM, Greg Symons email@example.com wrote:
I’m trying to set up a test in test-kitchen to verify the idempotency of one of my resource providers. Has anybody else come up with a way to 1) converge multiple times in a test-kitchen suite and 2) after a second converge verify that nothing has changed (or at the very least none of the things that potentially could’ve changed if the recipe wasn’t idempotent)? I tried testing this in chefspec, but unfortunately it looks like I need a real chef run to expose my idempotency bug.