Last active
August 29, 2015 14:00
-
-
Save harlanbarnes/11151382 to your computer and use it in GitHub Desktop.
Hack to work around cookbooks experiencing CHEF-4107
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe 'foo::default' do | |
let(:chef_run) do | |
ChefSpec::Runner.new do |node| | |
# Holy Hack - This bug: https://tickets.opscode.com/browse/CHEF-4107 | |
# in the pleaserun cookbook (which is depended on by the logstash | |
# cookbook). As such, the rspec fails. So I'm cleaning them out before | |
# we converge | |
require 'find' | |
Find.find(node.runner.options[:cookbook_path]) do |path| | |
if File.directory?(path) and File.basename(path) == 'PaxHeader' | |
FileUtils.rm_rf(path) | |
end | |
end | |
end.converge(described_recipe) | |
end | |
it 'installs foo' do | |
expect(chef_run).to install_package('foo') | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment