Skip to content

Instantly share code, notes, and snippets.

@retr0h
Created October 5, 2012 00:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save retr0h/3837277 to your computer and use it in GitHub Desktop.
Save retr0h/3837277 to your computer and use it in GitHub Desktop.
# Trying to get tests in this cookbook to work... https://github.com/retr0h/cookbook-sol
emopop:sol(master)☭% ls cookbooks
chef_handler reboot-handler
# Doesn't look at ./cookbooks/
describe "sol::default" do
let(:chef_run) { ChefSpec::ChefRunner.new.converge "sol::default" }
describe "ttyS1" do
it "has proper modes" do
chef_run.template("/etc/init/ttyS1.conf").should be_owned_by("root", "root")
end
end
end
# ERROR
Cookbook reboot-handler not found. If you're loading reboot-handler from another cookbook, make sure you configure the dependency in your metadata
# Forcing to use ./cookbooks/
describe "sol::default" do
let(:chef_run) { ChefSpec::ChefRunner.new('./cookbooks').converge "sol::default" }
describe "ttyS1" do
it "has proper modes" do
chef_run.template("/etc/init/ttyS1.conf").should be_owned_by("root", "root")
end
end
end
# ERROR -- can't find itself
1) sol::default ttyS1 has proper modes
Failure/Error: let(:chef_run) { ChefSpec::ChefRunner.new('./cookbooks').converge "sol::default" }
Chef::Exceptions::CookbookNotFound:
Cookbook sol not found. If you're loading sol from another cookbook, make sure you configure the dependency in your metadata
# ./spec/default_spec.rb:5:in `block (2 levels) in <top (required)>'
# ./spec/default_spec.rb:9:in `block (3 levels) in <top (required)>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment