From a02b5d88f62d3ecd8d8b4af2016b9651726d74c4 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Fri, 7 Oct 2016 20:22:30 -0700 Subject: [PATCH] Define matchers for ChefSpec Signed-off-by: Tim Smith --- .github/PULL_REQUEST_TEMPLATE.md | 6 +++--- libraries/matchers.rb | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 5224928b..b8c6d9f9 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -7,8 +7,8 @@ [List any existing issues this PR resolves] ### Check List -- [ ] All tests pass. See https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/TESTING.MD + +- [ ] All tests pass. See - [ ] New functionality includes testing. - [ ] New functionality has been documented in the README if applicable -- [ ] The CLA has been signed. See https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD - +- [ ] All commits have been signed for the Developer Certificate of Origin. See diff --git a/libraries/matchers.rb b/libraries/matchers.rb index b57d2c68..7b1e94c2 100644 --- a/libraries/matchers.rb +++ b/libraries/matchers.rb @@ -4,6 +4,8 @@ # apt_preference ################# + ChefSpec.define_matcher :apt_preference + def add_apt_preference(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:apt_preference, :add, resource_name) end @@ -16,6 +18,8 @@ def remove_apt_preference(resource_name) # apt_repository ################# + ChefSpec.define_matcher :apt_repository + def add_apt_repository(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:apt_repository, :add, resource_name) end @@ -28,6 +32,8 @@ def remove_apt_repository(resource_name) # apt_update ################# + ChefSpec.define_matcher :apt_update + def update_apt_update(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:apt_update, :update, resource_name) end