Issue #4939 has been updated by Dan Bode.

We should promote consistent code when possible. The resource in the provider 
class is accessible either as an instance variable or from the reader method. 
Accessing it from the reader method is preferable because it's easier to stub a 
method than it is to stub an instance variable.
----------------------------------------
Refactor #4939: providers should refer to resource method not @resource
https://projects.puppetlabs.com/issues/4939

Author: Dan Bode
Status: Needs more information
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected Puppet version: 2.6.1
Branch: 


This makes it possible to stub out the resource method for testing.

running:

<pre>
grep -r @resource puppet/provider/*
</pre>

shows that many providers need to be refactored


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to