chefspec 5.2.0 → 5.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/README.md +3 -3
- data/chefspec.gemspec +1 -1
- data/examples/bff_package/recipes/install.rb +13 -0
- data/examples/bff_package/recipes/purge.rb +13 -0
- data/examples/bff_package/recipes/remove.rb +13 -0
- data/examples/bff_package/recipes/upgrade.rb +13 -0
- data/examples/bff_package/spec/install_spec.rb +23 -0
- data/examples/bff_package/spec/purge_spec.rb +19 -0
- data/examples/bff_package/spec/remove_spec.rb +19 -0
- data/examples/bff_package/spec/upgrade_spec.rb +19 -0
- data/examples/homebrew_package/recipes/install.rb +13 -0
- data/examples/homebrew_package/recipes/purge.rb +13 -0
- data/examples/homebrew_package/recipes/remove.rb +13 -0
- data/examples/homebrew_package/recipes/upgrade.rb +13 -0
- data/examples/homebrew_package/spec/install_spec.rb +23 -0
- data/examples/homebrew_package/spec/purge_spec.rb +19 -0
- data/examples/homebrew_package/spec/remove_spec.rb +19 -0
- data/examples/homebrew_package/spec/upgrade_spec.rb +19 -0
- data/examples/launchd/recipes/create.rb +5 -0
- data/examples/launchd/recipes/create_if_missing.rb +3 -0
- data/examples/launchd/recipes/delete.rb +3 -0
- data/examples/launchd/recipes/disable.rb +3 -0
- data/examples/launchd/recipes/enable.rb +3 -0
- data/examples/launchd/spec/create_if_missing_spec.rb +10 -0
- data/examples/launchd/spec/create_spec.rb +14 -0
- data/examples/launchd/spec/delete_spec.rb +10 -0
- data/examples/launchd/spec/disable_spec.rb +10 -0
- data/examples/launchd/spec/enable_spec.rb +10 -0
- data/examples/openbsd_package/recipes/install.rb +13 -0
- data/examples/openbsd_package/recipes/purge.rb +13 -0
- data/examples/openbsd_package/recipes/remove.rb +13 -0
- data/examples/openbsd_package/recipes/upgrade.rb +13 -0
- data/examples/openbsd_package/spec/install_spec.rb +23 -0
- data/examples/openbsd_package/spec/purge_spec.rb +19 -0
- data/examples/openbsd_package/spec/remove_spec.rb +19 -0
- data/examples/openbsd_package/spec/upgrade_spec.rb +19 -0
- data/examples/osx_profile/recipes/install.rb +8 -0
- data/examples/osx_profile/recipes/remove.rb +8 -0
- data/examples/osx_profile/spec/install_spec.rb +15 -0
- data/examples/osx_profile/spec/remove_spec.rb +13 -0
- data/examples/paludis_package/recipes/install.rb +13 -0
- data/examples/paludis_package/recipes/purge.rb +13 -0
- data/examples/paludis_package/recipes/remove.rb +13 -0
- data/examples/paludis_package/recipes/upgrade.rb +13 -0
- data/examples/paludis_package/spec/install_spec.rb +23 -0
- data/examples/paludis_package/spec/purge_spec.rb +19 -0
- data/examples/paludis_package/spec/remove_spec.rb +19 -0
- data/examples/paludis_package/spec/upgrade_spec.rb +19 -0
- data/examples/ruby_block/recipes/create.rb +8 -0
- data/examples/ruby_block/spec/create_spec.rb +13 -0
- data/examples/script/recipes/run_ksh.rb +13 -0
- data/examples/script/spec/run_ksh_spec.rb +23 -0
- data/examples/solaris_package/recipes/upgrade.rb +13 -0
- data/examples/solaris_package/spec/upgrade_spec.rb +19 -0
- data/examples/systemd_unit/recipes/create.rb +3 -0
- data/examples/systemd_unit/recipes/delete.rb +3 -0
- data/examples/systemd_unit/recipes/disable.rb +3 -0
- data/examples/systemd_unit/recipes/enable.rb +3 -0
- data/examples/systemd_unit/recipes/mask.rb +3 -0
- data/examples/systemd_unit/recipes/reload_or_restart.rb +3 -0
- data/examples/systemd_unit/recipes/reload_or_try_restart.rb +3 -0
- data/examples/systemd_unit/recipes/restart.rb +3 -0
- data/examples/systemd_unit/recipes/start.rb +3 -0
- data/examples/systemd_unit/recipes/stop.rb +3 -0
- data/examples/systemd_unit/recipes/try_restart.rb +3 -0
- data/examples/systemd_unit/recipes/unmask.rb +3 -0
- data/examples/systemd_unit/spec/create_spec.rb +10 -0
- data/examples/systemd_unit/spec/delete_spec.rb +10 -0
- data/examples/systemd_unit/spec/disable_spec.rb +10 -0
- data/examples/systemd_unit/spec/enable_spec.rb +10 -0
- data/examples/systemd_unit/spec/mask_spec.rb +10 -0
- data/examples/systemd_unit/spec/reload_or_restart_spec.rb +10 -0
- data/examples/systemd_unit/spec/reload_or_try_restart_spec.rb +10 -0
- data/examples/systemd_unit/spec/restart_spec.rb +10 -0
- data/examples/systemd_unit/spec/start_spec.rb +10 -0
- data/examples/systemd_unit/spec/stop_spec.rb +10 -0
- data/examples/systemd_unit/spec/try_restart_spec.rb +10 -0
- data/examples/systemd_unit/spec/unmask_spec.rb +10 -0
- data/examples/zypper_package/recipes/install.rb +13 -0
- data/examples/zypper_package/recipes/purge.rb +13 -0
- data/examples/zypper_package/recipes/remove.rb +13 -0
- data/examples/zypper_package/recipes/upgrade.rb +13 -0
- data/examples/zypper_package/spec/install_spec.rb +23 -0
- data/examples/zypper_package/spec/purge_spec.rb +19 -0
- data/examples/zypper_package/spec/remove_spec.rb +19 -0
- data/examples/zypper_package/spec/upgrade_spec.rb +19 -0
- data/features/attributes.feature +1 -1
- data/features/bff_package.feature +12 -0
- data/features/chocolatey_package.feature +1 -0
- data/features/compile_time.feature +1 -1
- data/features/dsc_resource.feature +1 -0
- data/features/homebrew_package.feature +12 -0
- data/features/launchd.feature +23 -0
- data/features/openbsd_package.feature +14 -0
- data/features/osx_profile.feature +19 -0
- data/features/paludis_package.feature +14 -0
- data/features/roles.feature +1 -1
- data/features/ruby_block.feature +1 -0
- data/features/script.feature +8 -0
- data/features/solaris_package.feature +1 -0
- data/features/systemd_unit.feature +33 -0
- data/features/windows_package.feature +1 -0
- data/features/zypper_package.feature +18 -0
- data/lib/chefspec/api.rb +8 -0
- data/lib/chefspec/api/bff_package.rb +154 -0
- data/lib/chefspec/api/homebrew_package.rb +154 -0
- data/lib/chefspec/api/launchd.rb +151 -0
- data/lib/chefspec/api/openbsd_package.rb +155 -0
- data/lib/chefspec/api/osx_profile.rb +63 -0
- data/lib/chefspec/api/paludis_package.rb +155 -0
- data/lib/chefspec/api/ruby_block.rb +31 -0
- data/lib/chefspec/api/script.rb +39 -0
- data/lib/chefspec/api/solaris_package.rb +37 -0
- data/lib/chefspec/api/systemd_unit.rb +353 -0
- data/lib/chefspec/api/zypper_package.rb +154 -0
- data/lib/chefspec/version.rb +1 -1
- metadata +111 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd963cf180a20e6c7271d54e58c941c719052754
|
4
|
+
data.tar.gz: cc514dca888b1a8c99fcd4e4c917dc56df2ff8e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3cc38869f14061cbe3b2ebaf3f6c46042429925b7495ef55b5471074f23a6afb435dd7aebfad101a4ffa943ef793fb28b176159a3bd5dd390365a3e7cd50e2c
|
7
|
+
data.tar.gz: 1f5f5cf99b9926d07232b850d195d2817c58200d773ca419e16dd7fe64b9f3f81c93ad5fa931835e2430eb05787a8e4df94f0cc03ecc9fc39b9e4bbfeb58ea03
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,23 @@
|
|
1
1
|
# CHANGELOG for ChefSpec
|
2
2
|
|
3
|
+
## 5.3.0 (October 20, 2016)
|
4
|
+
|
5
|
+
IMPROVEMENTS
|
6
|
+
|
7
|
+
- Added all missing matchers for built-in chef-client resources
|
8
|
+
|
9
|
+
- osx_profile
|
10
|
+
- zypper_package
|
11
|
+
- systemd_unit
|
12
|
+
- openbsd_package
|
13
|
+
- launchd
|
14
|
+
- homebrew_package
|
15
|
+
- bff_package
|
16
|
+
|
17
|
+
BUG FIXES
|
18
|
+
|
19
|
+
- Fixed readme examples to properly specify the platform / platform version and to use a cache dir that will work on Windows
|
20
|
+
|
3
21
|
## 5.2.0 (September 21, 2016)
|
4
22
|
|
5
23
|
IMPROVEMENTS
|
data/README.md
CHANGED
@@ -54,7 +54,7 @@ the associated ChefSpec test might look like:
|
|
54
54
|
require 'chefspec'
|
55
55
|
|
56
56
|
describe 'example::default' do
|
57
|
-
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
57
|
+
let(:chef_run) { ChefSpec::SoloRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
|
58
58
|
|
59
59
|
it 'installs foo' do
|
60
60
|
expect(chef_run).to install_package('foo')
|
@@ -88,7 +88,7 @@ RSpec.configure do |config|
|
|
88
88
|
config.environment_path = '/var/environments'
|
89
89
|
|
90
90
|
# Specify the path for Chef Solo file cache path (default: nil)
|
91
|
-
config.file_cache_path =
|
91
|
+
config.file_cache_path = Chef::Config[:file_cache_path]
|
92
92
|
|
93
93
|
# Specify the Chef log_level (default: :warn)
|
94
94
|
config.log_level = :debug
|
@@ -120,7 +120,7 @@ ChefSpec::SoloRunner.new(cookbook_path: '/var/my/other/path', role_path: '/var/m
|
|
120
120
|
# This can be overridden by passing the `file_cache_path` option.
|
121
121
|
# Note: Resources containing `Chef::Config[:file_cache_path]` in their name or
|
122
122
|
# attributes, will fail unless this option is specified.
|
123
|
-
ChefSpec::SoloRunner.new(file_cache_path:
|
123
|
+
ChefSpec::SoloRunner.new(file_cache_path: Chef::Config[:file_cache_path])
|
124
124
|
|
125
125
|
# Add debug log output
|
126
126
|
ChefSpec::SoloRunner.new(log_level: :debug).converge(described_recipe)
|
data/chefspec.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
24
24
|
s.require_paths = ['lib']
|
25
25
|
|
26
|
-
# ChefSpec requires Ruby 2.1+ since ChefDK uses 2.1
|
26
|
+
# ChefSpec requires Ruby 2.1+ since ChefDK uses 2.1+ (depending on version)
|
27
27
|
s.required_ruby_version = '>= 2.1'
|
28
28
|
|
29
29
|
s.add_dependency 'chef', '>= 12.0'
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'chefspec'
|
2
|
+
|
3
|
+
describe 'bff_package::install' do
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
|
+
|
6
|
+
it 'installs a bff_package with the default action' do
|
7
|
+
expect(chef_run).to install_bff_package('default_action')
|
8
|
+
expect(chef_run).to_not install_bff_package('not_default_action')
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'installs a bff_package with an explicit action' do
|
12
|
+
expect(chef_run).to install_bff_package('explicit_action')
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'installs a bff_package with attributes' do
|
16
|
+
expect(chef_run).to install_bff_package('with_attributes').with(version: '1.0.0')
|
17
|
+
expect(chef_run).to_not install_bff_package('with_attributes').with(version: '1.2.3')
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'installs a bff_package when specifying the identity attribute' do
|
21
|
+
expect(chef_run).to install_bff_package('identity_attribute')
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'chefspec'
|
2
|
+
|
3
|
+
describe 'bff_package::purge' do
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
|
+
|
6
|
+
it 'purges a bff_package with an explicit action' do
|
7
|
+
expect(chef_run).to purge_bff_package('explicit_action')
|
8
|
+
expect(chef_run).to_not purge_bff_package('not_explicit_action')
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'purges a bff_package with attributes' do
|
12
|
+
expect(chef_run).to purge_bff_package('with_attributes').with(version: '1.0.0')
|
13
|
+
expect(chef_run).to_not purge_bff_package('with_attributes').with(version: '1.2.3')
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'purges a bff_package when specifying the identity attribute' do
|
17
|
+
expect(chef_run).to purge_bff_package('identity_attribute')
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'chefspec'
|
2
|
+
|
3
|
+
describe 'bff_package::remove' do
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
|
+
|
6
|
+
it 'removes a bff_package with an explicit action' do
|
7
|
+
expect(chef_run).to remove_bff_package('explicit_action')
|
8
|
+
expect(chef_run).to_not remove_bff_package('not_explicit_action')
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'removes a bff_package with attributes' do
|
12
|
+
expect(chef_run).to remove_bff_package('with_attributes').with(version: '1.0.0')
|
13
|
+
expect(chef_run).to_not remove_bff_package('with_attributes').with(version: '1.2.3')
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'removes a bff_package when specifying the identity attribute' do
|
17
|
+
expect(chef_run).to remove_bff_package('identity_attribute')
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'chefspec'
|
2
|
+
|
3
|
+
describe 'bff_package::upgrade' do
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
|
+
|
6
|
+
it 'upgrades a bff_package with an explicit action' do
|
7
|
+
expect(chef_run).to upgrade_bff_package('explicit_action')
|
8
|
+
expect(chef_run).to_not upgrade_bff_package('not_explicit_action')
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'upgrades a bff_package with attributes' do
|
12
|
+
expect(chef_run).to upgrade_bff_package('with_attributes').with(version: '1.0.0')
|
13
|
+
expect(chef_run).to_not upgrade_bff_package('with_attributes').with(version: '1.2.3')
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'upgrades a bff_package when specifying the identity attribute' do
|
17
|
+
expect(chef_run).to upgrade_bff_package('identity_attribute')
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
homebrew_package 'default_action'
|
2
|
+
|
3
|
+
homebrew_package 'explicit_action' do
|
4
|
+
action :install
|
5
|
+
end
|
6
|
+
|
7
|
+
homebrew_package 'with_attributes' do
|
8
|
+
version '1.0.0'
|
9
|
+
end
|
10
|
+
|
11
|
+
homebrew_package 'specifying the identity attribute' do
|
12
|
+
package_name 'identity_attribute'
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
homebrew_package 'explicit_action' do
|
2
|
+
action :purge
|
3
|
+
end
|
4
|
+
|
5
|
+
homebrew_package 'with_attributes' do
|
6
|
+
version '1.0.0'
|
7
|
+
action :purge
|
8
|
+
end
|
9
|
+
|
10
|
+
homebrew_package 'specifying the identity attribute' do
|
11
|
+
package_name 'identity_attribute'
|
12
|
+
action :purge
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
homebrew_package 'explicit_action' do
|
2
|
+
action :remove
|
3
|
+
end
|
4
|
+
|
5
|
+
homebrew_package 'with_attributes' do
|
6
|
+
version '1.0.0'
|
7
|
+
action :remove
|
8
|
+
end
|
9
|
+
|
10
|
+
homebrew_package 'specifying the identity attribute' do
|
11
|
+
package_name 'identity_attribute'
|
12
|
+
action :remove
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
homebrew_package 'explicit_action' do
|
2
|
+
action :upgrade
|
3
|
+
end
|
4
|
+
|
5
|
+
homebrew_package 'with_attributes' do
|
6
|
+
version '1.0.0'
|
7
|
+
action :upgrade
|
8
|
+
end
|
9
|
+
|
10
|
+
homebrew_package 'specifying the identity attribute' do
|
11
|
+
package_name 'identity_attribute'
|
12
|
+
action :upgrade
|
13
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'chefspec'
|
2
|
+
|
3
|
+
describe 'homebrew_package::install' do
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
|
+
|
6
|
+
it 'installs a homebrew_package with the default action' do
|
7
|
+
expect(chef_run).to install_homebrew_package('default_action')
|
8
|
+
expect(chef_run).to_not install_homebrew_package('not_default_action')
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'installs a homebrew_package with an explicit action' do
|
12
|
+
expect(chef_run).to install_homebrew_package('explicit_action')
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'installs a homebrew_package with attributes' do
|
16
|
+
expect(chef_run).to install_homebrew_package('with_attributes').with(version: '1.0.0')
|
17
|
+
expect(chef_run).to_not install_homebrew_package('with_attributes').with(version: '1.2.3')
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'installs a homebrew_package when specifying the identity attribute' do
|
21
|
+
expect(chef_run).to install_homebrew_package('identity_attribute')
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'chefspec'
|
2
|
+
|
3
|
+
describe 'homebrew_package::purge' do
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
|
+
|
6
|
+
it 'purges a homebrew_package with an explicit action' do
|
7
|
+
expect(chef_run).to purge_homebrew_package('explicit_action')
|
8
|
+
expect(chef_run).to_not purge_homebrew_package('not_explicit_action')
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'purges a homebrew_package with attributes' do
|
12
|
+
expect(chef_run).to purge_homebrew_package('with_attributes').with(version: '1.0.0')
|
13
|
+
expect(chef_run).to_not purge_homebrew_package('with_attributes').with(version: '1.2.3')
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'purges a homebrew_package when specifying the identity attribute' do
|
17
|
+
expect(chef_run).to purge_homebrew_package('identity_attribute')
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'chefspec'
|
2
|
+
|
3
|
+
describe 'homebrew_package::remove' do
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
|
+
|
6
|
+
it 'removes a homebrew_package with an explicit action' do
|
7
|
+
expect(chef_run).to remove_homebrew_package('explicit_action')
|
8
|
+
expect(chef_run).to_not remove_homebrew_package('not_explicit_action')
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'removes a homebrew_package with attributes' do
|
12
|
+
expect(chef_run).to remove_homebrew_package('with_attributes').with(version: '1.0.0')
|
13
|
+
expect(chef_run).to_not remove_homebrew_package('with_attributes').with(version: '1.2.3')
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'removes a homebrew_package when specifying the identity attribute' do
|
17
|
+
expect(chef_run).to remove_homebrew_package('identity_attribute')
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'chefspec'
|
2
|
+
|
3
|
+
describe 'homebrew_package::upgrade' do
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
|
+
|
6
|
+
it 'upgrades a homebrew_package with an explicit action' do
|
7
|
+
expect(chef_run).to upgrade_homebrew_package('explicit_action')
|
8
|
+
expect(chef_run).to_not upgrade_homebrew_package('not_explicit_action')
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'upgrades a homebrew_package with attributes' do
|
12
|
+
expect(chef_run).to upgrade_homebrew_package('with_attributes').with(version: '1.0.0')
|
13
|
+
expect(chef_run).to_not upgrade_homebrew_package('with_attributes').with(version: '1.2.3')
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'upgrades a homebrew_package when specifying the identity attribute' do
|
17
|
+
expect(chef_run).to upgrade_homebrew_package('identity_attribute')
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'chefspec'
|
2
|
+
|
3
|
+
describe 'launchd::create_if_missing' do
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'mac_os_x', version: '10.11.1').converge(described_recipe) }
|
5
|
+
|
6
|
+
it 'creates a launchd daemon if missing with an explicit action' do
|
7
|
+
expect(chef_run).to create_if_missing_launchd('explicit_action')
|
8
|
+
expect(chef_run).to_not create_if_missing_launchd('not_explicit_action')
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'chefspec'
|
2
|
+
|
3
|
+
describe 'launchd::create' do
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'mac_os_x', version: '10.11.1').converge(described_recipe) }
|
5
|
+
|
6
|
+
it 'creates a launchd daemon with an explicit action' do
|
7
|
+
expect(chef_run).to create_launchd('explicit_action')
|
8
|
+
expect(chef_run).to_not create_launchd('not_explicit_action')
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'creates a launchd daemon with a default_action action' do
|
12
|
+
expect(chef_run).to create_launchd('default_action')
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'chefspec'
|
2
|
+
|
3
|
+
describe 'launchd::delete' do
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'mac_os_x', version: '10.11.1').converge(described_recipe) }
|
5
|
+
|
6
|
+
it 'deletes a launchd with an explicit action' do
|
7
|
+
expect(chef_run).to delete_launchd('explicit_action')
|
8
|
+
expect(chef_run).to_not delete_launchd('not_explicit_action')
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'chefspec'
|
2
|
+
|
3
|
+
describe 'launchd::disable' do
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'mac_os_x', version: '10.11.1').converge(described_recipe) }
|
5
|
+
|
6
|
+
it 'disables a launchd daemon with an explicit action' do
|
7
|
+
expect(chef_run).to disable_launchd('explicit_action')
|
8
|
+
expect(chef_run).to_not disable_launchd('not_explicit_action')
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'chefspec'
|
2
|
+
|
3
|
+
describe 'launchd::enable' do
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'mac_os_x', version: '10.11.1').converge(described_recipe) }
|
5
|
+
|
6
|
+
it 'enables a launchd daemon with an explicit action' do
|
7
|
+
expect(chef_run).to enable_launchd('explicit_action')
|
8
|
+
expect(chef_run).to_not enable_launchd('not_explicit_action')
|
9
|
+
end
|
10
|
+
end
|