summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-11-19 13:40:20 -0800
committerGitHub <noreply@github.com>2018-11-19 13:40:20 -0800
commit44fe94f81d2bb4944d01d5d1054a51e8ce16054b (patch)
tree51ff0b1ed4544671151d04b8b6c9f63d93bfd8e0 /spec
parent08a6d9fafe755cd8498953c508aff0eb787e0100 (diff)
parente979ba2ccf10cfa09481e65fd7009bb309247123 (diff)
downloadchef-44fe94f81d2bb4944d01d5d1054a51e8ce16054b.tar.gz
Merge pull request #7954 from chef/lcg/require-libraries
Chef-15: require instead of load libraries
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/run_context/cookbook_compiler_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/unit/run_context/cookbook_compiler_spec.rb b/spec/unit/run_context/cookbook_compiler_spec.rb
index e93088cd5f..c3a4c1b98f 100644
--- a/spec/unit/run_context/cookbook_compiler_spec.rb
+++ b/spec/unit/run_context/cookbook_compiler_spec.rb
@@ -1,6 +1,6 @@
#
# Author:: Daniel DeLeo (<dan@chef.io>)
-# Copyright:: Copyright 2012-2016, Chef Software Inc.
+# Copyright:: Copyright 2012-2018, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -108,6 +108,10 @@ describe Chef::RunContext::CookbookCompiler do
compiler.compile_libraries
expect(LibraryLoadOrder.load_order).to eq(["dependency1", "dependency2", "test-with-deps", "circular-dep2", "circular-dep1", "test-with-circular-deps"])
+
+ # additionally test that we only load them once
+ compiler.compile_libraries
+ expect(LibraryLoadOrder.load_order).to eq(["dependency1", "dependency2", "test-with-deps", "circular-dep2", "circular-dep1", "test-with-circular-deps"])
end
end