summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-06-03 23:18:39 -0700
committerJohn Keiser <john@johnkeiser.com>2015-06-03 23:18:39 -0700
commita0115458cd27e1b9e6c05f56fdff88dc1ccca0d9 (patch)
tree4d5430fd015b2b0eb3b893d35d5ce7ab06246245 /spec/unit
parent288a37ae2f6a3999b380efe77c1459baf13d5ccb (diff)
downloadchef-a0115458cd27e1b9e6c05f56fdff88dc1ccca0d9.tar.gz
Fix hyphenated LWRP nameshyphenated-lwrp
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/lwrp_spec.rb19
1 files changed, 17 insertions, 2 deletions
diff --git a/spec/unit/lwrp_spec.rb b/spec/unit/lwrp_spec.rb
index f48fa1715b..dbf76d3c13 100644
--- a/spec/unit/lwrp_spec.rb
+++ b/spec/unit/lwrp_spec.rb
@@ -122,6 +122,23 @@ describe "LWRP" do
end
+ context "When an LWRP resource in cookbook l-w-r-p is loaded" do
+ before do
+ @tmpdir = Dir.mktmpdir("lwrp_test")
+ resource_path = File.join(@tmpdir, "foo.rb")
+ IO.write(resource_path, "default_action :create")
+ provider_path = File.join(@tmpdir, "foo.rb")
+ IO.write(provider_path, <<-EOM)
+ action :create do
+ raise "hi"
+ end
+ EOM
+ end
+
+ it "Can find the resource at l_w_r_p_foo" do
+ end
+ end
+
context "When an LWRP resource lwrp_foo is loaded" do
before do
@tmpdir = Dir.mktmpdir("lwrp_test")
@@ -531,8 +548,6 @@ describe "LWRP" do
let(:lwrp_cookbok_name) { "l-w-r-p" }
it "sets itself as a provider for a resource of the same name" do
- pp Chef::Platform::ProviderPriorityMap.instance.send(:priority_map)
-
incorrect_providers = Chef::Platform::ProviderPriorityMap.instance.list_handlers(node, :'l-w-r-p_buck_passer')
expect(incorrect_providers).to eq([])