sous-chefs / certificate

Development repository for the certificate cookbook
https://supermarket.chef.io/cookbooks/certificate
73 stars 43 forks source link

ChefSpec 4.1 matcher deprecation #40

Closed rmoriz closed 9 years ago

rmoriz commented 9 years ago

Fixes deprecation warnings with chefspec 4.1.x and above with a backwards compatible solution.

Warning:

[DEPRECATION] `ChefSpec::Runner.define_runner_method' is deprecated. It is being used in the certificate_manage resource matcher.Please use `ChefSpec.define_matcher' instead. (called from spec/recipes/_certificates_spec.rb:5:in `block (2 levels) in <top (required)>')

Source: https://github.com/sethvargo/chefspec/blob/master/lib/chefspec/deprecations.rb#L21

Solution inspired by https://github.com/opscode-cookbooks/windows/commit/a413233b59ca475af41d31425ce1f8897433f0b6

biinari commented 9 years ago

:+1:

tmatilai commented 9 years ago

Looks good, thanks!