Created
September 20, 2013 04:23
-
-
Save ericr3r/6633275 to your computer and use it in GitHub Desktop.
Chef Infrastructure errata
This file contains hidden or 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 'chefspec' | |
describe 'my_cookbook::default' do | |
let(:chef_run) { ChefSpec::ChefRunner.new(platform:'ubuntu', version:'12.04') } | |
it 'creates a greetings file, containing the platform name' do | |
chef_run.converge(described_recipe) | |
expect(chef_run).to create_file_with_content('/tmp/greeting.txt','Hello! ubuntu!') | |
end | |
it 'uses a node attribute as greeting text' do | |
chef_run.node.override['my_cookbook']['greeting'] = "Go!" | |
chef_run.converge(described_recipe) | |
expect(chef_run).to create_file_with_content('/tmp/greeting.txt','Go! ubuntu!') | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks a lot for finding this and sorry for any inconvenience it may have caused you.
The errata should go online on packtpub.com soon.