forked from GannettDigital/chef-yum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
matchers.rb
27 lines (21 loc) · 864 Bytes
/
matchers.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Matchers for chefspec 3
if defined?(ChefSpec)
def create_yum_repository(resource_name)
ChefSpec::Matchers::ResourceMatcher.new(:yum_repository, :create, resource_name)
end
def add_yum_repository(resource_name)
ChefSpec::Matchers::ResourceMatcher.new(:yum_repository, :add, resource_name)
end
def delete_yum_repository(resource_name)
ChefSpec::Matchers::ResourceMatcher.new(:yum_repository, :delete, resource_name)
end
def remove_yum_repository(resource_name)
ChefSpec::Matchers::ResourceMatcher.new(:yum_repository, :remove, resource_name)
end
def create_yum_globalconfig(resource_name)
ChefSpec::Matchers::ResourceMatcher.new(:yum_globalconfig, :create, resource_name)
end
def delete_yum_globalconfig(resource_name)
ChefSpec::Matchers::ResourceMatcher.new(:yum_globalconfig, :delete, resource_name)
end
end