Module: ChefSpec::API::MountMatchers
- Defined in:
- lib/chefspec/api/mount.rb
Overview
Instance Method Summary collapse
-
#disable_mount(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
mount
resource exists in the Chef run with the action:disable
. -
#enable_mount(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
mount
resource exists in the Chef run with the action:enable
. -
#mount_mount(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
mount
resource exists in the Chef run with the action:mount
. -
#remount_mount(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
mount
resource exists in the Chef run with the action:remount
. -
#umount_mount(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a
mount
resource exists in the Chef run with the action:umount
.
Instance Method Details
#disable_mount(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a mount
resource exists in the Chef run with the action :disable
. Given a Chef Recipe that disables “/mnt/volume1” as a mount
:
mount '/mnt/volume1' do
action :disable
end
The Examples section demonstrates the different ways to test a mount
resource with ChefSpec.
39 40 41 |
# File 'lib/chefspec/api/mount.rb', line 39 def disable_mount(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:mount, :disable, resource_name) end |
#enable_mount(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a mount
resource exists in the Chef run with the action :enable
. Given a Chef Recipe that enables “/mnt/volume1” as a mount
:
mount '/mnt/volume1' do
action :enable
end
The Examples section demonstrates the different ways to test a mount
resource with ChefSpec.
76 77 78 |
# File 'lib/chefspec/api/mount.rb', line 76 def enable_mount(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:mount, :enable, resource_name) end |
#mount_mount(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a mount
resource exists in the Chef run with the action :mount
. Given a Chef Recipe that mounts “/mnt/volume1” as a mount
:
mount '/mnt/volume1' do
action :mount
end
The Examples section demonstrates the different ways to test a mount
resource with ChefSpec.
113 114 115 |
# File 'lib/chefspec/api/mount.rb', line 113 def mount_mount(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:mount, :mount, resource_name) end |
#remount_mount(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a mount
resource exists in the Chef run with the action :remount
. Given a Chef Recipe that remounts “/mnt/volume1” as a mount
:
mount '/mnt/volume1' do
action :remount
end
The Examples section demonstrates the different ways to test a mount
resource with ChefSpec.
150 151 152 |
# File 'lib/chefspec/api/mount.rb', line 150 def remount_mount(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:mount, :remount, resource_name) end |
#umount_mount(resource_name) ⇒ ChefSpec::Matchers::ResourceMatcher
Assert that a mount
resource exists in the Chef run with the action :umount
. Given a Chef Recipe that umounts “/mnt/volume1” as a mount
:
mount '/mnt/volume1' do
action :umount
end
The Examples section demonstrates the different ways to test a mount
resource with ChefSpec.
187 188 189 |
# File 'lib/chefspec/api/mount.rb', line 187 def umount_mount(resource_name) ChefSpec::Matchers::ResourceMatcher.new(:mount, :umount, resource_name) end |