Module: ChefSpec::API::MdadmMatchers
- Defined in:
- lib/chefspec/api/mdadm.rb
Overview
Instance Method Summary collapse
-
#assemble_mdadm(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
mdadm
resource exists in the Chef run with the action:assemble
. -
#create_mdadm(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
mdadm
resource exists in the Chef run with the action:create
. -
#stop_mdadm(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
mdadm
resource exists in the Chef run with the action:stop
.
Instance Method Details
#assemble_mdadm(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a mdadm
resource exists in the Chef run with the action :assemble
. Given a Chef Recipe that assembles “/dev/md0” as a mdadm
:
mdadm '/dev/md0' do
action :assemble
end
The Examples section demonstrates the different ways to test a mdadm
resource with ChefSpec.
39 40 41 |
# File 'lib/chefspec/api/mdadm.rb', line 39 def assemble_mdadm(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:mdadm, :assemble, resource_name) end |
#create_mdadm(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a mdadm
resource exists in the Chef run with the action :create
. Given a Chef Recipe that creates “/dev/md0” as a mdadm
:
mdadm '/dev/md0' do
action :create
end
The Examples section demonstrates the different ways to test a mdadm
resource with ChefSpec.
76 77 78 |
# File 'lib/chefspec/api/mdadm.rb', line 76 def create_mdadm(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:mdadm, :create, resource_name) end |
#stop_mdadm(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a mdadm
resource exists in the Chef run with the action :stop
. Given a Chef Recipe that stops “/dev/md0” as a mdadm
:
mdadm '/dev/md0' do
action :stop
end
The Examples section demonstrates the different ways to test a mdadm
resource with ChefSpec.
113 114 115 |
# File 'lib/chefspec/api/mdadm.rb', line 113 def stop_mdadm(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:mdadm, :stop, resource_name) end |