chefspec 7.0.0 → 7.1.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 +11 -1
- data/Gemfile +6 -0
- data/README.md +43 -11
- data/Rakefile +48 -8
- data/chefspec.gemspec +0 -8
- data/examples/cab_package/spec/install_spec.rb +20 -18
- data/examples/cab_package/spec/remove_spec.rb +17 -15
- data/examples/cached/spec/default_spec.rb +1 -0
- data/examples/compile_time/spec/default_spec.rb +2 -0
- data/examples/custom_matcher/libraries/matcher.rb +1 -23
- data/examples/dnf_package/spec/install_spec.rb +20 -18
- data/examples/dnf_package/spec/purge_spec.rb +17 -15
- data/examples/dnf_package/spec/remove_spec.rb +17 -15
- data/examples/dnf_package/spec/upgrade_spec.rb +17 -15
- data/examples/heavy_provider_light_resource/spec/provider_service_spec.rb +1 -0
- data/examples/msu_package/spec/install_spec.rb +20 -18
- data/examples/msu_package/spec/remove_spec.rb +17 -15
- data/examples/server/spec/exotic_port_spec.rb +15 -2
- data/lib/chefspec.rb +1 -8
- data/lib/chefspec/api.rb +6 -84
- data/lib/chefspec/api/do_nothing.rb +18 -21
- data/lib/chefspec/api/include_recipe.rb +20 -23
- data/lib/chefspec/api/link.rb +20 -99
- data/lib/chefspec/api/notifications.rb +32 -35
- data/lib/chefspec/api/reboot.rb +5 -14
- data/lib/chefspec/api/render_file.rb +29 -32
- data/lib/chefspec/api/state_attrs.rb +22 -25
- data/lib/chefspec/api/subscriptions.rb +29 -32
- data/lib/chefspec/api/user.rb +216 -219
- data/lib/chefspec/extensions.rb +16 -0
- data/lib/chefspec/extensions/chef/resource.rb +90 -8
- data/lib/chefspec/version.rb +1 -1
- data/lib/chefspec/zero_server.rb +20 -18
- metadata +3 -313
- data/examples/custom_resource/libraries/matchers.rb +0 -5
- data/examples/use_inline_resources/libraries/matchers.rb +0 -5
- data/features/apt_package.feature +0 -14
- data/features/apt_repository.feature +0 -15
- data/features/apt_update.feature +0 -13
- data/features/attributes.feature +0 -7
- data/features/batch.feature +0 -10
- data/features/bff_package.feature +0 -12
- data/features/cab_package.feature +0 -21
- data/features/cached.feature +0 -7
- data/features/chef_gem.feature +0 -14
- data/features/chocolatey_package.feature +0 -14
- data/features/compile_time.feature +0 -7
- data/features/cookbook_file.feature +0 -13
- data/features/cron.feature +0 -11
- data/features/custom_matcher.feature +0 -11
- data/features/custom_resource.feature +0 -7
- data/features/deploy.feature +0 -12
- data/features/directory.feature +0 -11
- data/features/dnf_package.feature +0 -26
- data/features/do_nothing.feature +0 -10
- data/features/dpkg_package.feature +0 -12
- data/features/dsc_resource.feature +0 -10
- data/features/dsc_script.feature +0 -10
- data/features/env.feature +0 -12
- data/features/erl_call.feature +0 -10
- data/features/execute.feature +0 -10
- data/features/exotic_zero_port.feature +0 -7
- data/features/expect_exception.feature +0 -12
- data/features/file.feature +0 -13
- data/features/freebsd_package.feature +0 -11
- data/features/gem_package.feature +0 -14
- data/features/git.feature +0 -12
- data/features/group.feature +0 -13
- data/features/guards.feature +0 -10
- data/features/heavy_provider_light_resource.feature +0 -10
- data/features/homebrew_package.feature +0 -12
- data/features/http_request.feature +0 -15
- data/features/ifconfig.feature +0 -13
- data/features/include_recipe.feature +0 -10
- data/features/ips_package.feature +0 -12
- data/features/launchd.feature +0 -17
- data/features/link.feature +0 -12
- data/features/log.feature +0 -10
- data/features/macports_package.feature +0 -13
- data/features/mdadm.feature +0 -12
- data/features/mount.feature +0 -14
- data/features/msu_package.feature +0 -23
- data/features/multiple_actions.feature +0 -12
- data/features/multiple_run_action.feature +0 -7
- data/features/notifications.feature +0 -14
- data/features/ohai.feature +0 -10
- data/features/openbsd_package.feature +0 -12
- data/features/osx_profile.feature +0 -13
- data/features/package.feature +0 -14
- data/features/pacman_package.feature +0 -13
- data/features/paludis_package.feature +0 -12
- data/features/portage_package.feature +0 -13
- data/features/powershell_script.feature +0 -10
- data/features/reboot.feature +0 -12
- data/features/registry_key.feature +0 -13
- data/features/remote_directory.feature +0 -12
- data/features/remote_file.feature +0 -13
- data/features/render_file.feature +0 -11
- data/features/roles.feature +0 -7
- data/features/route.feature +0 -11
- data/features/rpm_package.feature +0 -12
- data/features/ruby_block.feature +0 -11
- data/features/script.feature +0 -16
- data/features/server.feature +0 -16
- data/features/server_on_disk.feature +0 -16
- data/features/service.feature +0 -15
- data/features/smartos_package.feature +0 -12
- data/features/solaris_package.feature +0 -12
- data/features/state_attrs.feature +0 -7
- data/features/step_definitions/background_steps.rb +0 -7
- data/features/step_into.feature +0 -7
- data/features/stub_command.feature +0 -7
- data/features/stub_data_bag.feature +0 -7
- data/features/stub_data_bag_item.feature +0 -7
- data/features/stub_node.feature +0 -7
- data/features/stub_search.feature +0 -7
- data/features/subscribes.feature +0 -14
- data/features/subversion.feature +0 -13
- data/features/support/env.rb +0 -38
- data/features/support/executor.rb +0 -20
- data/features/support/exotic_zero_port.rb +0 -3
- data/features/support/on_disk.rb +0 -7
- data/features/systemd_unit.feature +0 -27
- data/features/template.feature +0 -13
- data/features/use_inline_resources.feature +0 -7
- data/features/user.feature +0 -15
- data/features/windows_package.feature +0 -11
- data/features/windows_service.feature +0 -16
- data/features/yum_package.feature +0 -13
- data/features/yum_repository.feature +0 -23
- data/features/zypper_package.feature +0 -13
- data/lib/chefspec/api/apt_package.rb +0 -192
- data/lib/chefspec/api/apt_repository.rb +0 -56
- data/lib/chefspec/api/apt_update.rb +0 -53
- data/lib/chefspec/api/batch.rb +0 -43
- data/lib/chefspec/api/bff_package.rb +0 -154
- data/lib/chefspec/api/cab_package.rb +0 -80
- data/lib/chefspec/api/chef_gem.rb +0 -191
- data/lib/chefspec/api/chocolatey_package.rb +0 -107
- data/lib/chefspec/api/cookbook_file.rb +0 -166
- data/lib/chefspec/api/cron.rb +0 -80
- data/lib/chefspec/api/deploy.rb +0 -117
- data/lib/chefspec/api/directory.rb +0 -80
- data/lib/chefspec/api/dnf_package.rb +0 -154
- data/lib/chefspec/api/dpkg_package.rb +0 -117
- data/lib/chefspec/api/dsc_resource.rb +0 -49
- data/lib/chefspec/api/dsc_script.rb +0 -37
- data/lib/chefspec/api/easy_install_package.rb +0 -154
- data/lib/chefspec/api/env.rb +0 -117
- data/lib/chefspec/api/erl_call.rb +0 -43
- data/lib/chefspec/api/execute.rb +0 -43
- data/lib/chefspec/api/file.rb +0 -166
- data/lib/chefspec/api/freebsd_package.rb +0 -80
- data/lib/chefspec/api/gem_package.rb +0 -191
- data/lib/chefspec/api/git.rb +0 -117
- data/lib/chefspec/api/group.rb +0 -154
- data/lib/chefspec/api/homebrew_package.rb +0 -154
- data/lib/chefspec/api/http_request.rb +0 -228
- data/lib/chefspec/api/ifconfig.rb +0 -154
- data/lib/chefspec/api/ips_package.rb +0 -117
- data/lib/chefspec/api/launchd.rb +0 -151
- data/lib/chefspec/api/log.rb +0 -43
- data/lib/chefspec/api/macports_package.rb +0 -154
- data/lib/chefspec/api/mdadm.rb +0 -117
- data/lib/chefspec/api/mount.rb +0 -192
- data/lib/chefspec/api/msu_package.rb +0 -81
- data/lib/chefspec/api/ohai.rb +0 -43
- data/lib/chefspec/api/openbsd_package.rb +0 -155
- data/lib/chefspec/api/osx_profile.rb +0 -63
- data/lib/chefspec/api/package.rb +0 -192
- data/lib/chefspec/api/pacman_package.rb +0 -155
- data/lib/chefspec/api/paludis_package.rb +0 -155
- data/lib/chefspec/api/portage_package.rb +0 -155
- data/lib/chefspec/api/powershell_script.rb +0 -43
- data/lib/chefspec/api/registry_key.rb +0 -166
- data/lib/chefspec/api/remote_directory.rb +0 -120
- data/lib/chefspec/api/remote_file.rb +0 -166
- data/lib/chefspec/api/route.rb +0 -80
- data/lib/chefspec/api/rpm_package.rb +0 -117
- data/lib/chefspec/api/ruby_block.rb +0 -68
- data/lib/chefspec/api/script.rb +0 -278
- data/lib/chefspec/api/service.rb +0 -246
- data/lib/chefspec/api/smartos_package.rb +0 -117
- data/lib/chefspec/api/solaris_package.rb +0 -117
- data/lib/chefspec/api/subversion.rb +0 -154
- data/lib/chefspec/api/systemd_unit.rb +0 -353
- data/lib/chefspec/api/template.rb +0 -166
- data/lib/chefspec/api/windows_package.rb +0 -86
- data/lib/chefspec/api/windows_service.rb +0 -286
- data/lib/chefspec/api/yum_package.rb +0 -154
- data/lib/chefspec/api/yum_repository.rb +0 -130
- data/lib/chefspec/api/zypper_package.rb +0 -154
- data/spec/unit/api_spec.rb +0 -18
@@ -1,14 +0,0 @@
|
|
1
|
-
Feature: The apt_package matcher
|
2
|
-
Background:
|
3
|
-
* I am using the "apt_package" cookbook
|
4
|
-
|
5
|
-
Scenario Outline: Running specs
|
6
|
-
* I successfully run `rspec spec/<Matcher>_spec.rb`
|
7
|
-
* the output should contain "0 failures"
|
8
|
-
Examples:
|
9
|
-
| Matcher |
|
10
|
-
| install |
|
11
|
-
| purge |
|
12
|
-
| reconfig |
|
13
|
-
| remove |
|
14
|
-
| upgrade |
|
@@ -1,15 +0,0 @@
|
|
1
|
-
@not_chef_12_6_0
|
2
|
-
@not_chef_12_7_2
|
3
|
-
@not_chef_12_8_1
|
4
|
-
|
5
|
-
Feature: The apt_repository matcher
|
6
|
-
Background:
|
7
|
-
* I am using the "apt_repository" cookbook
|
8
|
-
|
9
|
-
Scenario Outline: Running specs
|
10
|
-
* I successfully run `rspec spec/<Matcher>_spec.rb`
|
11
|
-
* the output should contain "0 failures"
|
12
|
-
Examples:
|
13
|
-
| Matcher |
|
14
|
-
| add |
|
15
|
-
| remove |
|
data/features/apt_update.feature
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
@not_chef_12_6_0
|
2
|
-
|
3
|
-
Feature: The apt_update matcher
|
4
|
-
Background:
|
5
|
-
* I am using the "apt_update" cookbook
|
6
|
-
|
7
|
-
Scenario Outline: Running specs
|
8
|
-
* I successfully run `rspec spec/<Matcher>_spec.rb`
|
9
|
-
* the output should contain "0 failures"
|
10
|
-
Examples:
|
11
|
-
| Matcher |
|
12
|
-
| periodic |
|
13
|
-
| update |
|
data/features/attributes.feature
DELETED
data/features/batch.feature
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
Feature: The bff_package matcher
|
2
|
-
Background:
|
3
|
-
* I am using the "bff_package" cookbook
|
4
|
-
|
5
|
-
Scenario Outline: Running specs
|
6
|
-
* I successfully run `rspec spec/<Matcher>_spec.rb`
|
7
|
-
* the output should contain "0 failures"
|
8
|
-
Examples:
|
9
|
-
| Matcher |
|
10
|
-
| install |
|
11
|
-
| purge |
|
12
|
-
| remove |
|
@@ -1,21 +0,0 @@
|
|
1
|
-
@not_chef_12_6_0
|
2
|
-
@not_chef_12_7_2
|
3
|
-
@not_chef_12_8_1
|
4
|
-
@not_chef_12_9_41
|
5
|
-
@not_chef_12_10_24
|
6
|
-
@not_chef_12_11_18
|
7
|
-
@not_chef_12_12_15
|
8
|
-
@not_chef_12_13_37
|
9
|
-
@not_chef_12_14_89
|
10
|
-
|
11
|
-
Feature: The cab_package matcher
|
12
|
-
Background:
|
13
|
-
* I am using the "cab_package" cookbook
|
14
|
-
|
15
|
-
Scenario Outline: Running specs
|
16
|
-
* I successfully run `rspec spec/<Matcher>_spec.rb`
|
17
|
-
* the output should contain "0 failures"
|
18
|
-
Examples:
|
19
|
-
| Matcher |
|
20
|
-
| install |
|
21
|
-
| remove |
|
data/features/cached.feature
DELETED
data/features/chef_gem.feature
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
Feature: The chef_gem matcher
|
2
|
-
Background:
|
3
|
-
* I am using the "chef_gem" cookbook
|
4
|
-
|
5
|
-
Scenario Outline: Running specs
|
6
|
-
* I successfully run `rspec spec/<Matcher>_spec.rb`
|
7
|
-
* the output should contain "0 failures"
|
8
|
-
Examples:
|
9
|
-
| Matcher |
|
10
|
-
| install |
|
11
|
-
| purge |
|
12
|
-
| reconfig |
|
13
|
-
| remove |
|
14
|
-
| upgrade |
|
@@ -1,14 +0,0 @@
|
|
1
|
-
@not_chef_12_6_0
|
2
|
-
|
3
|
-
Feature: The chocolatey_package matcher
|
4
|
-
Background:
|
5
|
-
* I am using the "chocolatey_package" cookbook
|
6
|
-
|
7
|
-
Scenario Outline: Running specs
|
8
|
-
* I successfully run `rspec spec/<Matcher>_spec.rb`
|
9
|
-
* the output should contain "0 failures"
|
10
|
-
Examples:
|
11
|
-
| Matcher |
|
12
|
-
| install |
|
13
|
-
| remove |
|
14
|
-
| upgrade |
|
@@ -1,13 +0,0 @@
|
|
1
|
-
Feature: The cookbook_file matcher
|
2
|
-
Background:
|
3
|
-
* I am using the "cookbook_file" cookbook
|
4
|
-
|
5
|
-
Scenario Outline: Running specs
|
6
|
-
* I successfully run `rspec spec/<Matcher>_spec.rb`
|
7
|
-
* the output should contain "0 failures"
|
8
|
-
Examples:
|
9
|
-
| Matcher |
|
10
|
-
| create |
|
11
|
-
| create_if_missing |
|
12
|
-
| delete |
|
13
|
-
| touch |
|
data/features/cron.feature
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
Feature: The cron matcher
|
2
|
-
Background:
|
3
|
-
* I am using the "cron" cookbook
|
4
|
-
|
5
|
-
Scenario Outline: Running specs
|
6
|
-
* I successfully run `rspec spec/<Matcher>_spec.rb`
|
7
|
-
* the output should contain "0 failures"
|
8
|
-
Examples:
|
9
|
-
| Matcher |
|
10
|
-
| create |
|
11
|
-
| delete |
|
@@ -1,11 +0,0 @@
|
|
1
|
-
Feature: The custom_matcher matcher
|
2
|
-
Background:
|
3
|
-
* I am using the "custom_matcher" cookbook
|
4
|
-
|
5
|
-
Scenario Outline: Running specs
|
6
|
-
* I successfully run `rspec spec/<Matcher>_spec.rb`
|
7
|
-
* the output should contain "0 failures"
|
8
|
-
Examples:
|
9
|
-
| Matcher |
|
10
|
-
| install |
|
11
|
-
| remove |
|
data/features/deploy.feature
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
Feature: The deploy matcher
|
2
|
-
Background:
|
3
|
-
* I am using the "deploy" cookbook
|
4
|
-
|
5
|
-
Scenario Outline: Running specs
|
6
|
-
* I successfully run `rspec spec/<Matcher>_spec.rb`
|
7
|
-
* the output should contain "0 failures"
|
8
|
-
Examples:
|
9
|
-
| Matcher |
|
10
|
-
| deploy |
|
11
|
-
| force_deploy |
|
12
|
-
| rollback |
|
data/features/directory.feature
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
Feature: The directory matcher
|
2
|
-
Background:
|
3
|
-
* I am using the "directory" cookbook
|
4
|
-
|
5
|
-
Scenario Outline: Running specs
|
6
|
-
* I successfully run `rspec spec/<Matcher>_spec.rb`
|
7
|
-
* the output should contain "0 failures"
|
8
|
-
Examples:
|
9
|
-
| Matcher |
|
10
|
-
| create |
|
11
|
-
| delete |
|
@@ -1,26 +0,0 @@
|
|
1
|
-
@not_chef_12_6_0
|
2
|
-
@not_chef_12_7_2
|
3
|
-
@not_chef_12_8_1
|
4
|
-
@not_chef_12_9_41
|
5
|
-
@not_chef_12_10_24
|
6
|
-
@not_chef_12_11_18
|
7
|
-
@not_chef_12_12_15
|
8
|
-
@not_chef_12_13_37
|
9
|
-
@not_chef_12_14_89
|
10
|
-
@not_chef_12_15_19
|
11
|
-
@not_chef_12_16_42
|
12
|
-
@not_chef_12_17_44
|
13
|
-
|
14
|
-
Feature: The dnf_package matcher
|
15
|
-
Background:
|
16
|
-
* I am using the "dnf_package" cookbook
|
17
|
-
|
18
|
-
Scenario Outline: Running specs
|
19
|
-
* I successfully run `rspec spec/<Matcher>_spec.rb`
|
20
|
-
* the output should contain "0 failures"
|
21
|
-
Examples:
|
22
|
-
| Matcher |
|
23
|
-
| install |
|
24
|
-
| purge |
|
25
|
-
| remove |
|
26
|
-
| upgrade |
|
data/features/do_nothing.feature
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
Feature: The dpkg_package matcher
|
2
|
-
Background:
|
3
|
-
* I am using the "dpkg_package" cookbook
|
4
|
-
|
5
|
-
Scenario Outline: Running specs
|
6
|
-
* I successfully run `rspec spec/<Matcher>_spec.rb`
|
7
|
-
* the output should contain "0 failures"
|
8
|
-
Examples:
|
9
|
-
| Matcher |
|
10
|
-
| install |
|
11
|
-
| purge |
|
12
|
-
| remove |
|
data/features/dsc_script.feature
DELETED
data/features/env.feature
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
Feature: The env matcher
|
2
|
-
Background:
|
3
|
-
* I am using the "env" cookbook
|
4
|
-
|
5
|
-
Scenario Outline: Running specs
|
6
|
-
* I successfully run `rspec spec/<Matcher>_spec.rb`
|
7
|
-
* the output should contain "0 failures"
|
8
|
-
Examples:
|
9
|
-
| Matcher |
|
10
|
-
| create |
|
11
|
-
| delete |
|
12
|
-
| modify |
|
data/features/erl_call.feature
DELETED
data/features/execute.feature
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
Feature: The ChefSpec server with exotic port
|
2
|
-
Background:
|
3
|
-
* I am using the "server" cookbook
|
4
|
-
|
5
|
-
Scenario Outline: Running specs
|
6
|
-
* I successfully run `rspec spec/exotic_port_spec.rb --require ../../../features/support/exotic_zero_port.rb`
|
7
|
-
* the output should contain "0 failures"
|
@@ -1,12 +0,0 @@
|
|
1
|
-
Feature: The expect_exception matcher
|
2
|
-
Background:
|
3
|
-
* I am using the "expect_exception" cookbook
|
4
|
-
|
5
|
-
Scenario Outline: Running specs
|
6
|
-
* I successfully run `rspec spec/<Matcher>_spec.rb`
|
7
|
-
* the output should contain "0 failures"
|
8
|
-
Examples:
|
9
|
-
| Matcher |
|
10
|
-
| compile_error |
|
11
|
-
| converge_error |
|
12
|
-
| no_error |
|
data/features/file.feature
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
Feature: The file matcher
|
2
|
-
Background:
|
3
|
-
* I am using the "file" cookbook
|
4
|
-
|
5
|
-
Scenario Outline: Running specs
|
6
|
-
* I successfully run `rspec spec/<Matcher>_spec.rb`
|
7
|
-
* the output should contain "0 failures"
|
8
|
-
Examples:
|
9
|
-
| Matcher |
|
10
|
-
| create |
|
11
|
-
| create_if_missing |
|
12
|
-
| delete |
|
13
|
-
| touch |
|
@@ -1,11 +0,0 @@
|
|
1
|
-
Feature: The freebsd_package matcher
|
2
|
-
Background:
|
3
|
-
* I am using the "freebsd_package" cookbook
|
4
|
-
|
5
|
-
Scenario Outline: Running specs
|
6
|
-
* I successfully run `rspec spec/<Matcher>_spec.rb`
|
7
|
-
* the output should contain "0 failures"
|
8
|
-
Examples:
|
9
|
-
| Matcher |
|
10
|
-
| install |
|
11
|
-
| remove |
|
@@ -1,14 +0,0 @@
|
|
1
|
-
Feature: The gem_package matcher
|
2
|
-
Background:
|
3
|
-
* I am using the "gem_package" cookbook
|
4
|
-
|
5
|
-
Scenario Outline: Running specs
|
6
|
-
* I successfully run `rspec spec/<Matcher>_spec.rb`
|
7
|
-
* the output should contain "0 failures"
|
8
|
-
Examples:
|
9
|
-
| Matcher |
|
10
|
-
| install |
|
11
|
-
| purge |
|
12
|
-
| reconfig |
|
13
|
-
| remove |
|
14
|
-
| upgrade |
|
data/features/git.feature
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
Feature: The git matcher
|
2
|
-
Background:
|
3
|
-
* I am using the "git" cookbook
|
4
|
-
|
5
|
-
Scenario Outline: Running specs
|
6
|
-
* I successfully run `rspec spec/<Matcher>_spec.rb`
|
7
|
-
* the output should contain "0 failures"
|
8
|
-
Examples:
|
9
|
-
| Matcher |
|
10
|
-
| checkout |
|
11
|
-
| export |
|
12
|
-
| sync |
|
data/features/group.feature
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
Feature: The group matcher
|
2
|
-
Background:
|
3
|
-
* I am using the "group" cookbook
|
4
|
-
|
5
|
-
Scenario Outline: Running specs
|
6
|
-
* I successfully run `rspec spec/<Matcher>_spec.rb`
|
7
|
-
* the output should contain "0 failures"
|
8
|
-
Examples:
|
9
|
-
| Matcher |
|
10
|
-
| create |
|
11
|
-
| manage |
|
12
|
-
| modify |
|
13
|
-
| remove |
|