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_ksh(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
kshresource 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.
76 77 78 |
# File 'lib/chefspec/api/script.rb', line 76 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.
115 116 117 |
# File 'lib/chefspec/api/script.rb', line 115 def run_csh(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:csh, :run, resource_name) end |
#run_ksh(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a ksh resource exists in the Chef run with the action :run. Given a Chef Recipe that runs “command” using ksh:
ksh 'command' do
action :run
end
The Examples section demonstrates the different ways to test a ksh resource with ChefSpec.
37 38 39 |
# File 'lib/chefspec/api/script.rb', line 37 def run_ksh(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:ksh, :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.
154 155 156 |
# File 'lib/chefspec/api/script.rb', line 154 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.
193 194 195 |
# File 'lib/chefspec/api/script.rb', line 193 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.
232 233 234 |
# File 'lib/chefspec/api/script.rb', line 232 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.
271 272 273 |
# File 'lib/chefspec/api/script.rb', line 271 def run_script(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:script, :run, resource_name) end |