diff options
Diffstat (limited to 'spec/unit/cookbook_spec.rb')
-rw-r--r-- | spec/unit/cookbook_spec.rb | 9 |
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 |