This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am bytheway on github. | |
* I am bytheway (https://keybase.io/bytheway) on keybase. | |
* I have a public key ASDBHtubA-E26rjpPKFyLFTd7G49wXuIy7bNGmwhRCMRsgo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Very contrived example, but... | |
# Given an LWRP called my_lwrp that looks something like: | |
action :create do | |
file '/tmp/foo' do | |
content custom_content | |
end | |
end | |
def custom_content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I wanted to find a way to unit test a "Heavy-Weight" provider, but all the examples I found ended up stubbing out | |
# the chef world to make sure we could verify functionality as well as prevent the provider from converging on the | |
# development machine. | |
# | |
# I started thinking that chefspec already isolates things, and provides a great suite of matchers that we can | |
# use to check on the creation of chef resources inside our heavy provider. This is one approach that allows | |
# testing a single provider method, without a full chef run, in "isolation," with the helpful chefspec matchers. | |
# In my spec_helper |