Module: ChefSpec::API::ScriptMatchers
- Defined in:
- lib/chefspec/api/script.rb
Overview
Instance Method Summary collapse
-
#run_bash(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
bashresource exists in the Chef run with the action:run. -
#run_csh(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
cshresource exists in the Chef run with the action:run. -
#run_perl(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
perlresource exists in the Chef run with the action:run. -
#run_python(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
pythonresource exists in the Chef run with the action:run. -
#run_ruby(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
rubyresource exists in the Chef run with the action:run. -
#run_script(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
scriptresource exists in the Chef run with the action:run.
Instance Method Details
#run_bash(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a bash resource exists in the Chef run with the action :run. Given a Chef Recipe that runs “command” using bash:
bash 'command' do
action :run
end
The Examples section demonstrates the different ways to test a bash resource with ChefSpec.
39 40 41 |
# File 'lib/chefspec/api/script.rb', line 39 def run_bash(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:bash, :run, resource_name) end |
#run_csh(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a csh resource exists in the Chef run with the action :run. Given a Chef Recipe that runs “command” using csh:
csh 'command' do
action :run
end
The Examples section demonstrates the different ways to test a csh resource with ChefSpec.
76 77 78 |
# File 'lib/chefspec/api/script.rb', line 76 def run_csh(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:csh, :run, resource_name) end |
#run_perl(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a perl resource exists in the Chef run with the action :run. Given a Chef Recipe that runs “command” using perl:
perl 'command' do
action :run
end
The Examples section demonstrates the different ways to test a perl resource with ChefSpec.
113 114 115 |
# File 'lib/chefspec/api/script.rb', line 113 def run_perl(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:perl, :run, resource_name) end |
#run_python(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a python resource exists in the Chef run with the action :run. Given a Chef Recipe that runs “command” using python:
python 'command' do
action :run
end
The Examples section demonstrates the different ways to test a python resource with ChefSpec.
150 151 152 |
# File 'lib/chefspec/api/script.rb', line 150 def run_python(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:python, :run, resource_name) end |
#run_ruby(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a ruby resource exists in the Chef run with the action :run. Given a Chef Recipe that runs “command” using ruby:
ruby 'command' do
action :run
end
The Examples section demonstrates the different ways to test a ruby resource with ChefSpec.
187 188 189 |
# File 'lib/chefspec/api/script.rb', line 187 def run_ruby(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:ruby, :run, resource_name) end |
#run_script(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a script resource exists in the Chef run with the action :run. Given a Chef Recipe that runs “command” using script:
script 'command' do
action :run
end
The Examples section demonstrates the different ways to test a script resource with ChefSpec.
224 225 226 |
# File 'lib/chefspec/api/script.rb', line 224 def run_script(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:script, :run, resource_name) end |