Module: ChefSpec::API::GitMatchers
- Defined in:
- lib/chefspec/api/git.rb
Overview
Instance Method Summary collapse
-
#checkout_git(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
gitresource exists in the Chef run with the action:checkout. -
#export_git(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
gitresource exists in the Chef run with the action:export. -
#sync_git(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
gitresource exists in the Chef run with the action:sync.
Instance Method Details
#checkout_git(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a git resource exists in the Chef run with the action :checkout. Given a Chef Recipe that checks out “git://…” as a git:
git 'git://...' do
action :checkout
end
The Examples section demonstrates the different ways to test a git resource with ChefSpec.
39 40 41 |
# File 'lib/chefspec/api/git.rb', line 39 def checkout_git(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:git, :checkout, resource_name) end |
#export_git(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a git resource exists in the Chef run with the action :export. Given a Chef Recipe that exports “git://” as a git:
git 'git://' do
action :export
end
The Examples section demonstrates the different ways to test a git resource with ChefSpec.
76 77 78 |
# File 'lib/chefspec/api/git.rb', line 76 def export_git(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:git, :export, resource_name) end |
#sync_git(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a git resource exists in the Chef run with the action :sync. Given a Chef Recipe that syncs “git://” as a git:
git 'git://' do
action :sync
end
The Examples section demonstrates the different ways to test a git resource with ChefSpec.
113 114 115 |
# File 'lib/chefspec/api/git.rb', line 113 def sync_git(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:git, :sync, resource_name) end |