summaryrefslogtreecommitdiff
path: root/spec/unit/cookbook_spec.rb
diff options
context:
space:
mode:
authorAdam Jacob <adam@hjksolutions.com>2008-04-08 00:57:17 -0700
committerAdam Jacob <adam@hjksolutions.com>2008-04-08 00:57:17 -0700
commit95eb1375f0647accd1b1a1569a7d0e3acc4a61e4 (patch)
treea58d6fddde4d7818dc33511ff8275c7b9f69f1c6 /spec/unit/cookbook_spec.rb
parent434f25ba07b5c0c50baa1e15b14a945bba3c3c3b (diff)
downloadchef-95eb1375f0647accd1b1a1569a7d0e3acc4a61e4.tar.gz
Adding chef-solo command, config examples, Chef::Log class, Chef::Log::Formatter, Chef::Compile, and all the tests
Diffstat (limited to 'spec/unit/cookbook_spec.rb')
-rw-r--r--spec/unit/cookbook_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/unit/cookbook_spec.rb b/spec/unit/cookbook_spec.rb
index f702fe32c1..15db9ca3d1 100644
--- a/spec/unit/cookbook_spec.rb
+++ b/spec/unit/cookbook_spec.rb
@@ -132,4 +132,13 @@ describe Chef::Cookbook do
node.name "Julia Child"
lambda { @cookbook.load_recipe("smackdown", node) }.should raise_error(ArgumentError)
end
+
+ it "should load the attributes if it has not already when a recipe is loaded" do
+ @cookbook.attribute_files = Dir[File.join(COOKBOOK_PATH, "attributes", "smokey.rb")]
+ @cookbook.recipe_files = Dir[File.join(COOKBOOK_PATH, "recipes", "**", "*.rb")]
+ node = Chef::Node.new
+ node.name "Julia Child"
+ recipe = @cookbook.load_recipe("openldap::gigantor", node)
+ node.smokey.should == "robinson"
+ end
end \ No newline at end of file