chefspec 5.3.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +6 -8
  3. data/CHANGELOG.md +23 -1
  4. data/README.md +94 -69
  5. data/chefspec.gemspec +2 -3
  6. data/examples/apt_package/spec/install_spec.rb +1 -1
  7. data/examples/apt_package/spec/purge_spec.rb +1 -1
  8. data/examples/apt_package/spec/reconfig_spec.rb +1 -1
  9. data/examples/apt_package/spec/remove_spec.rb +1 -1
  10. data/examples/apt_package/spec/upgrade_spec.rb +1 -1
  11. data/examples/apt_repository/spec/add_spec.rb +1 -1
  12. data/examples/apt_repository/spec/remove_spec.rb +1 -1
  13. data/examples/apt_update/spec/periodic_spec.rb +1 -1
  14. data/examples/apt_update/spec/update_spec.rb +1 -1
  15. data/examples/batch/spec/run_spec.rb +1 -1
  16. data/examples/cab_package/recipes/install.rb +13 -0
  17. data/examples/cab_package/recipes/remove.rb +13 -0
  18. data/examples/cab_package/spec/install_spec.rb +26 -0
  19. data/examples/cab_package/spec/remove_spec.rb +22 -0
  20. data/examples/chocolatey_package/spec/install_spec.rb +1 -1
  21. data/examples/chocolatey_package/spec/remove_spec.rb +1 -1
  22. data/examples/chocolatey_package/spec/upgrade_spec.rb +1 -1
  23. data/examples/dnf_package/recipes/install.rb +13 -0
  24. data/examples/dnf_package/recipes/purge.rb +13 -0
  25. data/examples/dnf_package/recipes/remove.rb +13 -0
  26. data/examples/dnf_package/recipes/upgrade.rb +13 -0
  27. data/examples/dnf_package/spec/install_spec.rb +26 -0
  28. data/examples/dnf_package/spec/purge_spec.rb +22 -0
  29. data/examples/dnf_package/spec/remove_spec.rb +22 -0
  30. data/examples/dnf_package/spec/upgrade_spec.rb +22 -0
  31. data/examples/dpkg_package/spec/install_spec.rb +1 -1
  32. data/examples/dpkg_package/spec/purge_spec.rb +1 -1
  33. data/examples/dpkg_package/spec/remove_spec.rb +1 -1
  34. data/examples/dsc_resource/spec/run_spec.rb +4 -4
  35. data/examples/dsc_script/spec/run_spec.rb +1 -1
  36. data/examples/env/spec/create_spec.rb +1 -1
  37. data/examples/env/spec/delete_spec.rb +1 -1
  38. data/examples/env/spec/modify_spec.rb +1 -1
  39. data/examples/freebsd_package/spec/install_spec.rb +1 -1
  40. data/examples/freebsd_package/spec/remove_spec.rb +1 -1
  41. data/examples/ips_package/spec/install_spec.rb +1 -1
  42. data/examples/ips_package/spec/remove_spec.rb +1 -1
  43. data/examples/ips_package/spec/upgrade_spec.rb +1 -1
  44. data/examples/msu_package/recipes/install.rb +13 -0
  45. data/examples/msu_package/recipes/remove.rb +13 -0
  46. data/examples/msu_package/spec/install_spec.rb +26 -0
  47. data/examples/msu_package/spec/remove_spec.rb +22 -0
  48. data/examples/pacman_package/spec/install_spec.rb +1 -1
  49. data/examples/pacman_package/spec/purge_spec.rb +1 -1
  50. data/examples/pacman_package/spec/remove_spec.rb +1 -1
  51. data/examples/pacman_package/spec/upgrade_spec.rb +1 -1
  52. data/examples/portage_package/spec/install_spec.rb +1 -1
  53. data/examples/portage_package/spec/purge_spec.rb +1 -1
  54. data/examples/portage_package/spec/remove_spec.rb +1 -1
  55. data/examples/portage_package/spec/upgrade_spec.rb +1 -1
  56. data/examples/powershell_script/spec/run_spec.rb +1 -1
  57. data/examples/registry_key/spec/create_if_missing_spec.rb +1 -1
  58. data/examples/registry_key/spec/create_spec.rb +1 -1
  59. data/examples/registry_key/spec/delete_key_spec.rb +1 -1
  60. data/examples/registry_key/spec/delete_spec.rb +1 -1
  61. data/examples/roles/roles/role.rb +2 -2
  62. data/examples/rpm_package/spec/install_spec.rb +1 -1
  63. data/examples/rpm_package/spec/remove_spec.rb +1 -1
  64. data/examples/rpm_package/spec/upgrade_spec.rb +1 -1
  65. data/examples/server/spec/data_bag_spec.rb +9 -11
  66. data/examples/smartos_package/spec/install_spec.rb +1 -1
  67. data/examples/smartos_package/spec/remove_spec.rb +1 -1
  68. data/examples/smartos_package/spec/upgrade_spec.rb +1 -1
  69. data/examples/solaris_package/spec/install_spec.rb +1 -1
  70. data/examples/solaris_package/spec/remove_spec.rb +1 -1
  71. data/examples/step_into/spec/default_spec.rb +2 -2
  72. data/examples/use_inline_resources/spec/default_spec.rb +1 -1
  73. data/examples/windows_package/spec/install_spec.rb +1 -1
  74. data/examples/windows_package/spec/remove_spec.rb +1 -1
  75. data/examples/windows_service/spec/configure_startup_spec.rb +1 -1
  76. data/examples/windows_service/spec/disable_spec.rb +1 -1
  77. data/examples/windows_service/spec/enable_spec.rb +1 -1
  78. data/examples/windows_service/spec/reload_spec.rb +1 -1
  79. data/examples/windows_service/spec/restart_spec.rb +1 -1
  80. data/examples/windows_service/spec/start_spec.rb +1 -1
  81. data/examples/windows_service/spec/stop_spec.rb +1 -1
  82. data/examples/yum_package/spec/install_spec.rb +1 -1
  83. data/examples/yum_package/spec/purge_spec.rb +1 -1
  84. data/examples/yum_package/spec/remove_spec.rb +1 -1
  85. data/examples/yum_package/spec/upgrade_spec.rb +1 -1
  86. data/examples/yum_repository/spec/add_spec.rb +1 -1
  87. data/examples/yum_repository/spec/create_spec.rb +1 -1
  88. data/examples/yum_repository/spec/delete_spec.rb +1 -1
  89. data/examples/yum_repository/spec/makecache_spec.rb +1 -1
  90. data/examples/yum_repository/spec/remove_spec.rb +1 -1
  91. data/features/apt_repository.feature +0 -6
  92. data/features/apt_update.feature +0 -6
  93. data/features/cab_package.feature +21 -0
  94. data/features/chocolatey_package.feature +0 -6
  95. data/features/dnf_package.feature +26 -0
  96. data/features/dsc_resource.feature +0 -3
  97. data/features/launchd.feature +0 -6
  98. data/features/msu_package.feature +23 -0
  99. data/features/notifications.feature +0 -7
  100. data/features/openbsd_package.feature +0 -2
  101. data/features/osx_profile.feature +0 -6
  102. data/features/paludis_package.feature +0 -2
  103. data/features/script.feature +0 -7
  104. data/features/server_on_disk.feature +16 -0
  105. data/features/subscribes.feature +0 -7
  106. data/features/support/env.rb +8 -0
  107. data/features/support/on_disk.rb +7 -0
  108. data/features/systemd_unit.feature +0 -6
  109. data/features/windows_package.feature +0 -5
  110. data/features/yum_repository.feature +0 -6
  111. data/features/zypper_package.feature +0 -5
  112. data/gemfiles/chefspec.gemfile +0 -6
  113. data/lib/chefspec/api/cab_package.rb +80 -0
  114. data/lib/chefspec/api/dnf_package.rb +154 -0
  115. data/lib/chefspec/api/msu_package.rb +81 -0
  116. data/lib/chefspec/api.rb +3 -0
  117. data/lib/chefspec/rspec.rb +2 -0
  118. data/lib/chefspec/server_methods.rb +4 -10
  119. data/lib/chefspec/server_runner.rb +2 -42
  120. data/lib/chefspec/version.rb +1 -1
  121. data/lib/chefspec/zero_server.rb +139 -0
  122. data/lib/chefspec.rb +0 -1
  123. metadata +36 -7
  124. data/lib/chefspec/chef_backwards_compat.rb +0 -79
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'rpm_package::install' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'centos', version: '7.2.1511')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'installs a rpm_package with the default action' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'rpm_package::remove' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'centos', version: '7.2.1511')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'removes a rpm_package with an explicit action' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'rpm_package::upgrade' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'centos', version: '7.2.1511')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'upgrades a rpm_package with an explicit action' do
@@ -2,17 +2,15 @@ require 'chefspec'
2
2
 
3
3
  describe 'server::data_bag' do
4
4
  let(:chef_run) do
5
- ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04') do |node, server|
6
- server.create_data_bag('accounts', {
7
- 'github' => {
8
- 'username' => 'sethvargo',
9
- 'password' => 'p@ssW0rd!',
10
- },
11
- 'twitter' => {
12
- 'username' => 'sethvargo',
13
- 'password' => '0th3r',
14
- },
15
- })
5
+ ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04') do |_node, server|
6
+ server.create_data_bag('accounts', 'github' => {
7
+ 'username' => 'sethvargo',
8
+ 'password' => 'p@ssW0rd!',
9
+ },
10
+ 'twitter' => {
11
+ 'username' => 'sethvargo',
12
+ 'password' => '0th3r',
13
+ })
16
14
  end.converge(described_recipe)
17
15
  end
18
16
 
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'smartos_package::install' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'smartos', version: '5.11')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'installs a smartos_package with the default action' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'smartos_package::remove' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'smartos', version: '5.11')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'removes a smartos_package with an explicit action' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'smartos_package::upgrade' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'smartos', version: '5.11')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'upgrades a smartos_package with an explicit action' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'solaris_package::install' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'solaris2', version: '5.11')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'installs a solaris_package with the default action' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'solaris_package::remove' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'solaris2', version: '5.11')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'removes a solaris_package with an explicit action' do
@@ -15,8 +15,8 @@ describe 'step_into::default' do
15
15
 
16
16
  context 'with :step_into' do
17
17
  let(:chef_run) do
18
- ChefSpec::ServerRunner.new(step_into: %w(step_into_lwrp provides_this))
19
- .converge(described_recipe)
18
+ ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04', step_into: %w(step_into_lwrp provides_this))
19
+ .converge(described_recipe)
20
20
  end
21
21
 
22
22
  it 'executes the LWRPs action' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'use_inline_resources::default' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04', step_into: ['use_inline_resources_lwrp'])
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'uses the LWRP' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'windows_package::install' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'windows', version: '2012R2')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'installs a windows_package with an explicit action' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'windows_package::remove' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'windows', version: '2012R2')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'removes a windows_package with an explicit action' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'windows_service::configure_startup' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'windows', version: '2012R2')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'configures startup for a windows_service with an explicit action' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'windows_service::disable' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'windows', version: '2012R2')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'disables a windows_service with an explicit action' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'windows_service::enable' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'windows', version: '2012R2')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'enables a windows_service with an explicit action' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'windows_service::reload' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'windows', version: '2012R2')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'reloads a windows_service with an explicit action' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'windows_service::restart' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'windows', version: '2012R2')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'restarts a windows_service with an explicit action' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'windows_service::start' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'windows', version: '2012R2')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'starts a windows_service with an explicit action' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'windows_service::stop' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'windows', version: '2012R2')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'stops a windows_service with an explicit action' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'yum_package::install' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'centos', version: '7.2.1511')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'installs a yum_package with the default action' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'yum_package::purge' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'centos', version: '7.2.1511')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'purges a yum_package with an explicit action' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'yum_package::remove' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'centos', version: '7.2.1511')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'removes a yum_package with an explicit action' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'yum_package::upgrade' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'centos', version: '7.2.1511')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'upgrades a yum_package with an explicit action' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'yum_repository::add' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'centos', version: '7.2.1511')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'creates a yum_repository with add action' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'yum_repository::create' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'centos', version: '7.2.1511')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'create a yum_repository with default action' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'yum_repository::delete' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'centos', version: '7.2.1511')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'removes a yum_repository with delete action' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'yum_repository::makecache' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'centos', version: '7.2.1511')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'makes cache for a yum_repository' do
@@ -3,7 +3,7 @@ require 'chefspec'
3
3
  describe 'yum_repository::remove' do
4
4
  let(:chef_run) do
5
5
  ChefSpec::ServerRunner.new(platform: 'centos', version: '7.2.1511')
6
- .converge(described_recipe)
6
+ .converge(described_recipe)
7
7
  end
8
8
 
9
9
  it 'removes a yum_repository with remove action' do
@@ -1,9 +1,3 @@
1
- @not_chef_12_0_3
2
- @not_chef_12_1_2
3
- @not_chef_12_2_1
4
- @not_chef_12_3_0
5
- @not_chef_12_4_3
6
- @not_chef_12_5_1
7
1
  @not_chef_12_6_0
8
2
  @not_chef_12_7_2
9
3
  @not_chef_12_8_1
@@ -1,9 +1,3 @@
1
- @not_chef_12_0_3
2
- @not_chef_12_1_2
3
- @not_chef_12_2_1
4
- @not_chef_12_3_0
5
- @not_chef_12_4_3
6
- @not_chef_12_5_1
7
1
  @not_chef_12_6_0
8
2
 
9
3
  Feature: The apt_update matcher
@@ -0,0 +1,21 @@
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 |
@@ -1,9 +1,3 @@
1
- @not_chef_12_0_3
2
- @not_chef_12_1_2
3
- @not_chef_12_2_1
4
- @not_chef_12_3_0
5
- @not_chef_12_4_3
6
- @not_chef_12_5_1
7
1
  @not_chef_12_6_0
8
2
 
9
3
  Feature: The chocolatey_package matcher
@@ -0,0 +1,26 @@
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 |
@@ -1,6 +1,3 @@
1
- @not_chef_12_0_3
2
- @not_chef_12_1_2
3
-
4
1
  Feature: The dsc_resource matcher
5
2
  Background:
6
3
  * I am using the "dsc_resource" cookbook
@@ -1,9 +1,3 @@
1
- @not_chef_12_0_3
2
- @not_chef_12_1_2
3
- @not_chef_12_2_1
4
- @not_chef_12_3_0
5
- @not_chef_12_4_3
6
- @not_chef_12_5_1
7
1
  @not_chef_12_6_0
8
2
  @not_chef_12_7_2
9
3
 
@@ -0,0 +1,23 @@
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
+
13
+ Feature: The msu_package matcher
14
+ Background:
15
+ * I am using the "msu_package" cookbook
16
+
17
+ Scenario Outline: Running specs
18
+ * I successfully run `rspec spec/<Matcher>_spec.rb`
19
+ * the output should contain "0 failures"
20
+ Examples:
21
+ | Matcher |
22
+ | install |
23
+ | remove |
@@ -1,10 +1,3 @@
1
- @not_chef_12_0_3
2
- @not_chef_12_1_2
3
- @not_chef_12_2_1
4
- @not_chef_12_3_0
5
- @not_chef_12_4_3
6
- @not_chef_12_5_1
7
-
8
1
  Feature: The notifications matcher
9
2
  Background:
10
3
  * I am using the "notifications" cookbook
@@ -1,5 +1,3 @@
1
- @not_chef_12_0_3
2
-
3
1
  Feature: The openbsd_package matcher
4
2
  Background:
5
3
  * I am using the "openbsd_package" cookbook
@@ -1,9 +1,3 @@
1
- @not_chef_12_0_3
2
- @not_chef_12_1_2
3
- @not_chef_12_2_1
4
- @not_chef_12_3_0
5
- @not_chef_12_4_3
6
- @not_chef_12_5_1
7
1
  @not_chef_12_6_0
8
2
 
9
3
  Feature: The osx_profile matcher
@@ -1,5 +1,3 @@
1
- @not_chef_12_0_3
2
-
3
1
  Feature: The paludis_package matcher
4
2
  Background:
5
3
  * I am using the "paludis_package" cookbook
@@ -1,10 +1,3 @@
1
- @not_chef_12_0_3
2
- @not_chef_12_1_2
3
- @not_chef_12_2_1
4
- @not_chef_12_3_0
5
- @not_chef_12_4_3
6
- @not_chef_12_5_1
7
-
8
1
  Feature: The script matcher
9
2
  Background:
10
3
  * I am using the "script" cookbook
@@ -0,0 +1,16 @@
1
+ Feature: The ChefSpec server with on-disk storage
2
+ Background:
3
+ * I am using the "server" cookbook
4
+
5
+ Scenario Outline: Running specs
6
+ * I successfully run `rspec spec/<Component>_spec.rb --require ../../../features/support/on_disk.rb`
7
+ * the output should contain "0 failures"
8
+ Examples:
9
+ | Component |
10
+ | client |
11
+ | data_bag |
12
+ | environment |
13
+ | node |
14
+ | render_with_cached |
15
+ | role |
16
+ | search |
@@ -1,10 +1,3 @@
1
- @not_chef_12_0_3
2
- @not_chef_12_1_2
3
- @not_chef_12_2_1
4
- @not_chef_12_3_0
5
- @not_chef_12_4_3
6
- @not_chef_12_5_1
7
-
8
1
  Feature: The subscribes matcher
9
2
  Background:
10
3
  * I am using the "subscribes" cookbook
@@ -20,6 +20,14 @@ Before do
20
20
  # RSpec::Runner) removes our configurations :(
21
21
  load 'lib/chefspec/rspec.rb'
22
22
 
23
+ # These settings need to be specified manually here rather than in rspec.rb
24
+ # because we do not want the zero-server terminating between each run. The
25
+ # runs happen too quickly in succession the port doesn't have time to get reset.
26
+ RSpec.configure do |config|
27
+ config.before(:suite) { ChefSpec::ZeroServer.setup! }
28
+ config.after(:each) { ChefSpec::ZeroServer.reset! }
29
+ end
30
+
23
31
  # Use a temporary directory to suppress Travis warnings
24
32
  @dirs = [Dir.mktmpdir]
25
33
  end
@@ -0,0 +1,7 @@
1
+ # We need to add this setting because for the first test, we haven't had a chance
2
+ # to load the chefspec rspec.rb file, so the first test will fail if we simply
3
+ # try to set it like we would otherwise.
4
+
5
+ RSpec.configure do |config|
6
+ config.add_setting :server_runner_data_store, default: :on_disk
7
+ end
@@ -1,9 +1,3 @@
1
- @not_chef_12_0_3
2
- @not_chef_12_1_2
3
- @not_chef_12_2_1
4
- @not_chef_12_3_0
5
- @not_chef_12_4_3
6
- @not_chef_12_5_1
7
1
  @not_chef_12_6_0
8
2
  @not_chef_12_7_2
9
3
  @not_chef_12_8_1
@@ -1,8 +1,3 @@
1
- @not_chef_12_0_3
2
- @not_chef_12_1_2
3
- @not_chef_12_2_1
4
- @not_chef_12_3_0
5
-
6
1
  Feature: The windows_package matcher
7
2
  Background:
8
3
  * I am using the "windows_package" cookbook
@@ -1,9 +1,3 @@
1
- @not_chef_12_0_3
2
- @not_chef_12_1_2
3
- @not_chef_12_2_1
4
- @not_chef_12_3_0
5
- @not_chef_12_4_3
6
- @not_chef_12_5_1
7
1
  @not_chef_12_6_0
8
2
  @not_chef_12_7_2
9
3
  @not_chef_12_8_1
@@ -1,8 +1,3 @@
1
- @not_chef_12_0_3
2
- @not_chef_12_1_2
3
- @not_chef_12_2_1
4
- @not_chef_12_3_0
5
-
6
1
  Feature: The zypper_package matcher
7
2
  Background:
8
3
  * I am using the "zypper_package" cookbook
@@ -1,11 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # travis runs on older chef releases failed while including
4
- # rack 2.X on Ruby 2.1. When we remove Ruby 2.1 support this can go
5
- if ENV['CHEF_VERSION'].to_f < 12.6
6
- gem 'rack', '~> 1.0'
7
- end
8
-
9
3
  if ENV['CHEF_VERSION'] == 'master'
10
4
  gem 'chef', github: 'chef/chef'
11
5
  else