summaryrefslogtreecommitdiff
path: root/lib/chef/run_context.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/run_context.rb')
-rw-r--r--lib/chef/run_context.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/chef/run_context.rb b/lib/chef/run_context.rb
index 7ef476c44b..5d29f766c9 100644
--- a/lib/chef/run_context.rb
+++ b/lib/chef/run_context.rb
@@ -658,9 +658,11 @@ ERROR_MESSAGE
}.map { |x| x.to_sym }
# Verify that we didn't miss any methods
- missing_methods = superclass.instance_methods(false) - instance_methods(false) - CHILD_STATE
- if !missing_methods.empty?
- raise "ERROR: not all methods of RunContext accounted for in ChildRunContext! All methods must be marked as child methods with CHILD_STATE or delegated to the parent_run_context. Missing #{missing_methods.join(", ")}."
+ unless @__skip_method_checking # hook specifically for compat_resource
+ missing_methods = superclass.instance_methods(false) - instance_methods(false) - CHILD_STATE
+ if !missing_methods.empty?
+ raise "ERROR: not all methods of RunContext accounted for in ChildRunContext! All methods must be marked as child methods with CHILD_STATE or delegated to the parent_run_context. Missing #{missing_methods.join(", ")}."
+ end
end
end
end