- From: Daniel DeLeo <
>
- To:
- Subject: [chef] Re: ChefDK and rake
- Date: Fri, 15 Aug 2014 09:44:50 -0700
On Friday, August 15, 2014 at 9:39 AM, Booker Bense wrote:
>
I'm testing a cookbook I set up with mis using the ChefDK environment.
>
>
I have done chef shell-init and
Just checking, you did eval "$(chef shell-init bash)” ?
>
>
which rspec returns
>
>
/opt/chefdk/embedded/bin/rspec
>
>
This command runs the chefspec tests.
>
>
chef exec rspec test/unit/spec
You don’t need `chef exec` if you configure your shell via shell-init.
>
>
However this rake task fails with error suggesting it's using the wrong
>
rspec
What’s the error?
>
>
>
require 'rspec/core/rake_task'
>
desc 'Run ChefSpec unit tests'
>
RSpec::Core::RakeTask.new(:spec) do |t, _args|
>
t.rspec_opts = 'test/unit/spec'
>
end
>
>
>
Is there something obvious I'm missing to make this work?
>
>
- Booker C. Bense
--
Daniel DeLeo
Archive powered by MHonArc 2.6.16.