summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-10-05 08:11:00 -0700
committerJohn Keiser <john@johnkeiser.com>2015-10-05 08:11:00 -0700
commitf42e439686db89a1e123ed5293b9e63ebb426bf1 (patch)
treeb2e396ccc1c4b84004ecaeef6e262f366845b194
parent69cf21c8b35d7fb94775db377e810908e5fad54a (diff)
downloadchef-f42e439686db89a1e123ed5293b9e63ebb426bf1.tar.gz
Fix forward module.to_sjk/forwarder-to_s
-rw-r--r--lib/chef/provider.rb2
-rw-r--r--spec/integration/recipes/resource_action_spec.rb5
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/chef/provider.rb b/lib/chef/provider.rb
index 3138704a55..e22f11d9be 100644
--- a/lib/chef/provider.rb
+++ b/lib/chef/provider.rb
@@ -265,7 +265,7 @@ class Chef
provider_class = self
@included_resource_dsl_module = Module.new do
extend Forwardable
- define_singleton_method(:to_s) { "#{resource_class} forwarder module" }
+ define_singleton_method(:to_s) { "forwarder module for #{provider_class}" }
define_singleton_method(:inspect) { to_s }
# Add a delegator for each explicit property that will get the *current* value
# of the property by default instead of the *actual* value.
diff --git a/spec/integration/recipes/resource_action_spec.rb b/spec/integration/recipes/resource_action_spec.rb
index 1c84b986cc..6f3f5ab47e 100644
--- a/spec/integration/recipes/resource_action_spec.rb
+++ b/spec/integration/recipes/resource_action_spec.rb
@@ -202,6 +202,11 @@ describe "Resource.action" do
let(:resource_dsl) { :action_jackson }
end
+ it "Can retrieve ancestors of action class without crashing" do
+ converge { action_jackson 'hi' }
+ expect { ActionJackson.action_class.ancestors.join(",") }.not_to raise_error
+ end
+
context "And 'action_jackgrandson' inheriting from ActionJackson and changing nothing" do
before(:context) {
class ActionJackgrandson < ActionJackson