[chef] ChefDK and rake


Chronological Thread 
  • From: Booker Bense < >
  • To:
  • Subject: [chef] ChefDK and rake
  • Date: Fri, 15 Aug 2014 09:39:21 -0700

I'm testing a cookbook I set up with mis using the ChefDK environment. 

I have done chef shell-init  and 
which  rspec returns 

/opt/chefdk/embedded/bin/rspec

This command runs the chefspec tests. 

chef exec rspec test/unit/spec

However this rake task fails with error suggesting it's using the wrong rspec

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



Archive powered by MHonArc 2.6.16.

§