Skip to content

Commit

Permalink
Ensure cache path is writable for old Chef/Moneta testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
fnichol committed Aug 5, 2014
1 parent 4accabe commit 12f8965
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/integration/new_release_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@

Chef::Config[:node_name] = ENV["CHEF_NODE_NAME"] || "opsycodesy"
Chef::Config[:client_key] = ENV["CHEF_CLIENT_KEY"] || make_client_key!
Chef::Config[:cache_options][:path] =
File.join(File.dirname(cookbook_path), "cache")
end

after do
%w[node_name client_key].map(&:to_sym).each do |attr|
Chef::Config[attr] = @saved.delete(attr)
end

FileUtils.remove_dir(cookbook_path)
FileUtils.remove_dir(File.dirname(cookbook_path))
end

let(:cookbook_path) { File.join(Dir.mktmpdir, "emeril") }
Expand Down

0 comments on commit 12f8965

Please sign in to comment.