summaryrefslogtreecommitdiff
path: root/spec/unit/lwrp_spec.rb
diff options
context:
space:
mode:
authorSerdar Sutay <serdar@opscode.com>2014-10-08 14:55:33 -0700
committerSerdar Sutay <serdar@opscode.com>2014-10-08 15:01:30 -0700
commit02fb9664331e88f1abc159bc673f813e9299952a (patch)
tree796587a6a684518b7d4f893c2e6137c55d8ddc13 /spec/unit/lwrp_spec.rb
parent7f236885e421954ba39e6daf0d9da30b16b04040 (diff)
downloadchef-02fb9664331e88f1abc159bc673f813e9299952a.tar.gz
Don't override LWRP resources or providers anymore in Chef 12.
Diffstat (limited to 'spec/unit/lwrp_spec.rb')
-rw-r--r--spec/unit/lwrp_spec.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/unit/lwrp_spec.rb b/spec/unit/lwrp_spec.rb
index 960aff3c36..28d32d71ba 100644
--- a/spec/unit/lwrp_spec.rb
+++ b/spec/unit/lwrp_spec.rb
@@ -42,7 +42,8 @@ describe "LWRP" do
end
Dir[File.expand_path( "lwrp/resources/*", CHEF_SPEC_DATA)].each do |file|
- Chef::Log.should_receive(:info).with(/overriding/)
+ Chef::Log.should_receive(:info).with(/Skipping/)
+ Chef::Log.should_receive(:debug).with(/anymore/)
Chef::Resource::LWRPBase.build_from_file("lwrp", file, nil)
end
end
@@ -53,16 +54,15 @@ describe "LWRP" do
end
Dir[File.expand_path( "lwrp/providers/*", CHEF_SPEC_DATA)].each do |file|
- Chef::Log.should_receive(:info).with(/overriding/)
+ Chef::Log.should_receive(:info).with(/Skipping/)
+ Chef::Log.should_receive(:debug).with(/anymore/)
Chef::Provider::LWRPBase.build_from_file("lwrp", file, nil)
end
end
- it "removes the old LRWP resource class from the list of resource subclasses [CHEF-3432]" do
- # CHEF-3432 regression test:
- # Chef::Resource keeps a list of all subclasses to assist class inflation
- # for json parsing (see Chef::JSONCompat). When replacing LWRP resources,
- # we need to ensure the old resource class is remove from that list.
+ it "keeps the old LRWP resource class in the list of resource subclasses" do
+ # This was originally CHEF-3432 regression test. But with Chef 12 we are
+ # not replacing the original classes anymore.
Dir[File.expand_path( "lwrp/resources/*", CHEF_SPEC_DATA)].each do |file|
Chef::Resource::LWRPBase.build_from_file("lwrp", file, nil)
end
@@ -71,7 +71,7 @@ describe "LWRP" do
Dir[File.expand_path( "lwrp/resources/*", CHEF_SPEC_DATA)].each do |file|
Chef::Resource::LWRPBase.build_from_file("lwrp", file, nil)
end
- Chef::Resource.resource_classes.should_not include(first_lwr_foo_class)
+ Chef::Resource.resource_classes.should include(first_lwr_foo_class)
end
it "does not attempt to remove classes from higher up namespaces [CHEF-4117]" do