forked from poise/python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmatchers.rb
More file actions
25 lines (20 loc) · 817 Bytes
/
matchers.rb
File metadata and controls
25 lines (20 loc) · 817 Bytes
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
if defined?(ChefSpec)
def install_python_pip(package_name)
ChefSpec::Matchers::ResourceMatcher.new(:python_pip, :install, package_name)
end
def upgrade_python_pip(package_name)
ChefSpec::Matchers::ResourceMatcher.new(:python_pip, :upgrade, package_name)
end
def remove_python_pip(package_name)
ChefSpec::Matchers::ResourceMatcher.new(:python_pip, :remove, package_name)
end
def purge_python_pip(package_name)
ChefSpec::Matchers::ResourceMatcher.new(:python_pip, :purge, package_name)
end
def create_python_virtualenv(virtualenv_name)
ChefSpec::Matchers::ResourceMatcher.new(:python_virtualenv, :create, virtualenv_name)
end
def delete_python_virtualenv(virtualenv_name)
ChefSpec::Matchers::ResourceMatcher.new(:python_virtualenv, :delete, virtualenv_name)
end
end