diff options
author | Adam Jacob <adam@hjksolutions.com> | 2008-04-07 18:14:25 -0700 |
---|---|---|
committer | Adam Jacob <adam@hjksolutions.com> | 2008-04-07 18:14:25 -0700 |
commit | 434f25ba07b5c0c50baa1e15b14a945bba3c3c3b (patch) | |
tree | 03085c689549a62d546d87e6484dde8756da2d23 /spec/unit/cookbook_loader_spec.rb | |
parent | f543b509ba61dd347512e8a9e3153a49a2a8cb6b (diff) | |
download | chef-434f25ba07b5c0c50baa1e15b14a945bba3c3c3b.tar.gz |
Adding the Params::Validate mixin, refactored Chef::Config to be a singleton, Implemented require_recipe
Diffstat (limited to 'spec/unit/cookbook_loader_spec.rb')
-rw-r--r-- | spec/unit/cookbook_loader_spec.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/unit/cookbook_loader_spec.rb b/spec/unit/cookbook_loader_spec.rb index 3da3e644ec..d66034ce7d 100644 --- a/spec/unit/cookbook_loader_spec.rb +++ b/spec/unit/cookbook_loader_spec.rb @@ -18,16 +18,15 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -require File.join(File.dirname(__FILE__), "..", "spec_helper") +require File.expand_path(File.join(File.dirname(__FILE__), "..", "spec_helper")) describe Chef::CookbookLoader do before(:each) do - config = Chef::Config.new - config.cookbook_path [ + Chef::Config.cookbook_path [ File.join(File.dirname(__FILE__), "..", "data", "cookbooks"), File.join(File.dirname(__FILE__), "..", "data", "kitchen") ] - @cl = Chef::CookbookLoader.new(config) + @cl = Chef::CookbookLoader.new() end it "should be a Chef::CookbookLoader object" do @@ -56,7 +55,7 @@ describe Chef::CookbookLoader do end it "should find all the cookbooks in the cookbook path" do - @cl.config.cookbook_path << File.join(File.dirname(__FILE__), "..", "data", "hidden-cookbooks") + Chef::Config.cookbook_path << File.join(File.dirname(__FILE__), "..", "data", "hidden-cookbooks") @cl.load_cookbooks @cl.detect { |cb| cb.name == :openldap }.should_not eql(nil) @cl.detect { |cb| cb.name == :apache2 }.should_not eql(nil) |