chefspec 5.1.1 → 5.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (158) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +11 -0
  3. data/examples/attributes/spec/default_spec.rb +1 -1
  4. data/examples/cached/spec/default_spec.rb +1 -1
  5. data/examples/chef_gem/spec/install_spec.rb +1 -1
  6. data/examples/chef_gem/spec/purge_spec.rb +1 -1
  7. data/examples/chef_gem/spec/reconfig_spec.rb +1 -1
  8. data/examples/chef_gem/spec/remove_spec.rb +1 -1
  9. data/examples/chef_gem/spec/upgrade_spec.rb +1 -1
  10. data/examples/compile_time/spec/default_spec.rb +1 -1
  11. data/examples/cookbook_file/spec/create_if_missing_spec.rb +1 -1
  12. data/examples/cookbook_file/spec/create_spec.rb +1 -1
  13. data/examples/cookbook_file/spec/delete_spec.rb +1 -1
  14. data/examples/cookbook_file/spec/touch_spec.rb +1 -1
  15. data/examples/cron/spec/create_spec.rb +1 -1
  16. data/examples/cron/spec/delete_spec.rb +1 -1
  17. data/examples/custom_matcher/spec/install_spec.rb +1 -1
  18. data/examples/custom_matcher/spec/remove_spec.rb +1 -1
  19. data/examples/deploy/spec/deploy_spec.rb +1 -1
  20. data/examples/deploy/spec/force_deploy_spec.rb +1 -1
  21. data/examples/deploy/spec/rollback_spec.rb +1 -1
  22. data/examples/directory/spec/create_spec.rb +1 -1
  23. data/examples/directory/spec/delete_spec.rb +1 -1
  24. data/examples/do_nothing/spec/default_spec.rb +1 -1
  25. data/examples/easy_install_package/spec/install_spec.rb +1 -1
  26. data/examples/easy_install_package/spec/purge_spec.rb +1 -1
  27. data/examples/easy_install_package/spec/remove_spec.rb +1 -1
  28. data/examples/easy_install_package/spec/upgrade_spec.rb +1 -1
  29. data/examples/erl_call/spec/run_spec.rb +1 -1
  30. data/examples/execute/spec/run_spec.rb +1 -1
  31. data/examples/expect_exception/spec/compile_error_spec.rb +1 -1
  32. data/examples/expect_exception/spec/converge_error_spec.rb +1 -1
  33. data/examples/expect_exception/spec/no_error_spec.rb +1 -1
  34. data/examples/file/spec/create_if_missing_spec.rb +1 -1
  35. data/examples/file/spec/create_spec.rb +1 -1
  36. data/examples/file/spec/delete_spec.rb +1 -1
  37. data/examples/file/spec/touch_spec.rb +1 -1
  38. data/examples/gem_package/spec/install_spec.rb +1 -1
  39. data/examples/gem_package/spec/purge_spec.rb +1 -1
  40. data/examples/gem_package/spec/reconfig_spec.rb +1 -1
  41. data/examples/gem_package/spec/remove_spec.rb +1 -1
  42. data/examples/gem_package/spec/upgrade_spec.rb +1 -1
  43. data/examples/git/spec/checkout_spec.rb +1 -1
  44. data/examples/git/spec/export_spec.rb +1 -1
  45. data/examples/git/spec/sync_spec.rb +1 -1
  46. data/examples/group/spec/create_spec.rb +1 -1
  47. data/examples/group/spec/manage_spec.rb +1 -1
  48. data/examples/group/spec/modify_spec.rb +1 -1
  49. data/examples/group/spec/remove_spec.rb +1 -1
  50. data/examples/guards/spec/default_spec.rb +1 -1
  51. data/examples/heavy_provider_light_resource/spec/provider_service_spec.rb +1 -1
  52. data/examples/http_request/spec/delete_spec.rb +1 -1
  53. data/examples/http_request/spec/get_spec.rb +1 -1
  54. data/examples/http_request/spec/head_spec.rb +1 -1
  55. data/examples/http_request/spec/options_spec.rb +1 -1
  56. data/examples/http_request/spec/post_spec.rb +1 -1
  57. data/examples/http_request/spec/put_spec.rb +1 -1
  58. data/examples/ifconfig/spec/add_spec.rb +1 -1
  59. data/examples/ifconfig/spec/delete_spec.rb +1 -1
  60. data/examples/ifconfig/spec/disable_spec.rb +1 -1
  61. data/examples/ifconfig/spec/enable_spec.rb +1 -1
  62. data/examples/include_recipe/spec/default_spec.rb +1 -1
  63. data/examples/link/spec/create_spec.rb +1 -1
  64. data/examples/link/spec/delete_spec.rb +1 -1
  65. data/examples/link/spec/link_to_spec.rb +1 -1
  66. data/examples/log/spec/write_spec.rb +1 -1
  67. data/examples/macports_package/spec/install_spec.rb +1 -1
  68. data/examples/macports_package/spec/purge_spec.rb +1 -1
  69. data/examples/macports_package/spec/remove_spec.rb +1 -1
  70. data/examples/macports_package/spec/upgrade_spec.rb +1 -1
  71. data/examples/mdadm/spec/assemble_spec.rb +1 -1
  72. data/examples/mdadm/spec/create_spec.rb +1 -1
  73. data/examples/mdadm/spec/stop_spec.rb +1 -1
  74. data/examples/mount/spec/disable_spec.rb +1 -1
  75. data/examples/mount/spec/enable_spec.rb +1 -1
  76. data/examples/mount/spec/mount_spec.rb +1 -1
  77. data/examples/mount/spec/remount_spec.rb +1 -1
  78. data/examples/mount/spec/umount_spec.rb +1 -1
  79. data/examples/multiple_actions/spec/default_spec.rb +1 -1
  80. data/examples/multiple_actions/spec/sequential_spec.rb +2 -2
  81. data/examples/multiple_run_action/spec/default_spec.rb +1 -1
  82. data/examples/notifications/spec/before_spec.rb +1 -1
  83. data/examples/notifications/spec/chained_spec.rb +1 -1
  84. data/examples/notifications/spec/default_spec.rb +1 -1
  85. data/examples/notifications/spec/delayed_spec.rb +1 -1
  86. data/examples/notifications/spec/immediately_spec.rb +1 -1
  87. data/examples/ohai/spec/reload_spec.rb +1 -1
  88. data/examples/package/spec/install_spec.rb +1 -1
  89. data/examples/package/spec/purge_spec.rb +1 -1
  90. data/examples/package/spec/reconfig_spec.rb +1 -1
  91. data/examples/package/spec/remove_spec.rb +1 -1
  92. data/examples/package/spec/upgrade_spec.rb +1 -1
  93. data/examples/reboot/spec/cancel_spec.rb +1 -1
  94. data/examples/reboot/spec/now_spec.rb +1 -1
  95. data/examples/reboot/spec/request_spec.rb +1 -1
  96. data/examples/remote_directory/spec/create_if_missing_spec.rb +1 -1
  97. data/examples/remote_directory/spec/create_spec.rb +1 -1
  98. data/examples/remote_directory/spec/delete_spec.rb +1 -1
  99. data/examples/remote_file/spec/create_if_missing_spec.rb +1 -1
  100. data/examples/remote_file/spec/create_spec.rb +1 -1
  101. data/examples/remote_file/spec/delete_spec.rb +1 -1
  102. data/examples/remote_file/spec/touch_spec.rb +1 -1
  103. data/examples/render_file/spec/default_spec.rb +1 -1
  104. data/examples/render_file/spec/template_helpers_spec.rb +1 -1
  105. data/examples/route/spec/add_spec.rb +1 -1
  106. data/examples/route/spec/delete_spec.rb +1 -1
  107. data/examples/ruby_block/spec/run_spec.rb +1 -1
  108. data/examples/script/spec/run_bash_spec.rb +1 -1
  109. data/examples/script/spec/run_csh_spec.rb +1 -1
  110. data/examples/script/spec/run_perl_spec.rb +1 -1
  111. data/examples/script/spec/run_python_spec.rb +1 -1
  112. data/examples/script/spec/run_ruby_spec.rb +1 -1
  113. data/examples/script/spec/run_script_spec.rb +1 -1
  114. data/examples/server/spec/client_spec.rb +1 -1
  115. data/examples/server/spec/data_bag_spec.rb +1 -1
  116. data/examples/server/spec/environment_spec.rb +1 -1
  117. data/examples/server/spec/node_spec.rb +4 -4
  118. data/examples/server/spec/render_with_cached_spec.rb +1 -1
  119. data/examples/server/spec/role_spec.rb +1 -1
  120. data/examples/server/spec/search_spec.rb +2 -2
  121. data/examples/service/spec/disable_spec.rb +1 -1
  122. data/examples/service/spec/enable_spec.rb +1 -1
  123. data/examples/service/spec/reload_spec.rb +1 -1
  124. data/examples/service/spec/restart_spec.rb +1 -1
  125. data/examples/service/spec/start_spec.rb +1 -1
  126. data/examples/service/spec/stop_spec.rb +1 -1
  127. data/examples/state_attrs/spec/default_spec.rb +1 -1
  128. data/examples/step_into/spec/default_spec.rb +1 -1
  129. data/examples/stub_command/spec/default_spec.rb +1 -1
  130. data/examples/subscribes/spec/before_spec.rb +1 -1
  131. data/examples/subscribes/spec/chained_spec.rb +1 -1
  132. data/examples/subscribes/spec/default_spec.rb +1 -1
  133. data/examples/subscribes/spec/delayed_spec.rb +1 -1
  134. data/examples/subscribes/spec/immediately_spec.rb +1 -1
  135. data/examples/subversion/spec/checkout_spec.rb +1 -1
  136. data/examples/subversion/spec/export_spec.rb +1 -1
  137. data/examples/subversion/spec/force_export_spec.rb +1 -1
  138. data/examples/subversion/spec/sync_spec.rb +1 -1
  139. data/examples/template/spec/create_if_missing_spec.rb +1 -1
  140. data/examples/template/spec/create_spec.rb +1 -1
  141. data/examples/template/spec/delete_spec.rb +1 -1
  142. data/examples/template/spec/touch_spec.rb +1 -1
  143. data/examples/use_inline_resources/spec/default_spec.rb +1 -1
  144. data/examples/user/spec/create_spec.rb +2 -2
  145. data/examples/user/spec/lock_spec.rb +2 -2
  146. data/examples/user/spec/manage_spec.rb +2 -2
  147. data/examples/user/spec/modify_spec.rb +2 -2
  148. data/examples/user/spec/remove_spec.rb +2 -2
  149. data/examples/user/spec/unlock_spec.rb +2 -2
  150. data/examples/yum_repository/recipes/makecache.rb +3 -0
  151. data/examples/yum_repository/spec/{make_cache_spec.rb → makecache_spec.rb} +2 -2
  152. data/features/yum_repository.feature +1 -1
  153. data/lib/chefspec/api/yum_repository.rb +5 -5
  154. data/lib/chefspec/solo_runner.rb +1 -1
  155. data/lib/chefspec/version.rb +1 -1
  156. data/templates/errors/may_need_to_specify_platform.erb +1 -1
  157. metadata +4 -4
  158. data/examples/yum_repository/recipes/make_cache.rb +0 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ee4f05ff2e8da02d4e67edcd08e3cb308bf275f0
4
- data.tar.gz: 8261a3465db6774d5b5d3c5b114e3517811f4047
3
+ metadata.gz: 0a24e7cee64fcf2585e39638dea9663e33a205db
4
+ data.tar.gz: 176b31a6d53d4998f8dd8d6e96239903eb7193e9
5
5
  SHA512:
6
- metadata.gz: 019fc9c25a49e7e890446119b3aed4856699be9d78138dcafadee05a85703037f884d078a9f3b00d60ce64683e48f23423f7fb4eecdd9236fce2b918e16a1aba
7
- data.tar.gz: 98c4a810505d55a203c59b055ec3e81883abe8925e0d98a87d3df4be326d1ce4b6ce340fe76832a6d063945e1a3b985674fe8f57aafce77c0baf2ea985394362
6
+ metadata.gz: 9f4105a75191604af70b05e9382b0ac6a3de9f0467701c2eb9a872132b736f9cbf0e3cc58ea85a602b4b9ecc9cf4ce858633b0def0547243c95cd3e364345dbc
7
+ data.tar.gz: bad97b2abad711ace7f453e26fb843b1f7ba5175f013cf280b416bd1e801a43a6492d737765080afcb5951282a5bd467bc7ef850bbd799484e1109a6375b5761
@@ -1,5 +1,16 @@
1
1
  # CHANGELOG for ChefSpec
2
2
 
3
+ ## 5.2.0 (September 21, 2016)
4
+
5
+ IMPROVEMENTS
6
+
7
+ - Added platform and versions to all examples to avoid deprecation warnings from Fauxhai
8
+ - Allow modifications to node object before converge
9
+
10
+ BUG FIXES
11
+
12
+ - Fix makecache matcher for yum_repository
13
+
3
14
  ## 5.1.1 (September 14, 2016)
4
15
 
5
16
  BUG FIXES
@@ -2,7 +2,7 @@ require 'chefspec'
2
2
 
3
3
  describe 'attributes::default' do
4
4
  let(:chef_run) do
5
- ChefSpec::ServerRunner.new do |node|
5
+ ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04') do |node|
6
6
  node.automatic['ipaddress'] = '500.500.500.500' # Intentionally not a real IP
7
7
  node.normal['attributes']['message'] = 'The new message is here'
8
8
  end.converge(described_recipe)
@@ -5,7 +5,7 @@ RSpec.configure do |config|
5
5
  end
6
6
 
7
7
  describe 'cached::default' do
8
- cached(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
8
+ cached(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
9
9
 
10
10
  it 'does not raise an exception' do
11
11
  expect { chef_run }.to_not raise_error
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'chef_gem::install' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'installs a chef_gem with the default action' do
7
7
  expect(chef_run).to install_chef_gem('default_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'chef_gem::purge' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'purges a chef_gem with an explicit action' do
7
7
  expect(chef_run).to purge_chef_gem('explicit_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'chef_gem::reconfig' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'reconfigs a chef_gem with an explicit action' do
7
7
  expect(chef_run).to reconfig_chef_gem('explicit_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'chef_gem::remove' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'removes a chef_gem with an explicit action' do
7
7
  expect(chef_run).to remove_chef_gem('explicit_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'chef_gem::upgrade' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'upgrades a chef_gem with an explicit action' do
7
7
  expect(chef_run).to upgrade_chef_gem('explicit_action')
@@ -1,5 +1,5 @@
1
1
  describe 'compile_time::default' do
2
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
2
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
3
3
 
4
4
  it 'matches without .at_compile_time' do
5
5
  expect(chef_run).to install_package('compile_time')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'cookbook_file::create_if_missing' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'creates a cookbook_file with an explicit action' do
7
7
  expect(chef_run).to create_cookbook_file_if_missing('/tmp/explicit_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'cookbook_file::create' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'creates a cookbook_file with the default action' do
7
7
  expect(chef_run).to create_cookbook_file('/tmp/default_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'cookbook_file::delete' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'deletes a cookbook_file with an explicit action' do
7
7
  expect(chef_run).to delete_cookbook_file('/tmp/explicit_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'cookbook_file::touch' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'touches a cookbook_file with an explicit action' do
7
7
  expect(chef_run).to touch_cookbook_file('/tmp/explicit_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'cron::create' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'creates a cron with the default action' do
7
7
  expect(chef_run).to create_cron('default_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'cron::delete' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'deletes a cron with an explicit action' do
7
7
  expect(chef_run).to delete_cron('explicit_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'custom_matcher::install' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'installs a custom_matcher with the default action' do
7
7
  expect(chef_run).to install_custom_matcher_thing('default_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'custom_matcher::remove' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'removes a custom_matcher with an explicit action' do
7
7
  expect(chef_run).to remove_custom_matcher_thing('explicit_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'deploy::deploy' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'deploys a deploy with an explicit action' do
7
7
  expect(chef_run).to deploy_deploy('/tmp/explicit_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'deploy::force_deploy' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'force deploys a deploy with an explicit action' do
7
7
  expect(chef_run).to force_deploy_deploy('/tmp/explicit_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'deploy::rollback' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'rollsback deploys a deploy with an explicit action' do
7
7
  expect(chef_run).to rollback_deploy('/tmp/explicit_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'directory::create' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'creates a directory with the default action' do
7
7
  expect(chef_run).to create_directory('/tmp/default_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'directory::delete' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'deletes a directory with an explicit action' do
7
7
  expect(chef_run).to delete_directory('/tmp/explicit_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'do_nothing::default' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'includes the `other` recipe' do
7
7
  execute = chef_run.execute('install')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'easy_install_package::install' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'installs a easy_install_package with the default action' do
7
7
  expect(chef_run).to install_easy_install_package('default_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'easy_install_package::purge' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'purges a easy_install_package with an explicit action' do
7
7
  expect(chef_run).to purge_easy_install_package('explicit_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'easy_install_package::remove' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'removes a easy_install_package with an explicit action' do
7
7
  expect(chef_run).to remove_easy_install_package('explicit_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'easy_install_package::upgrade' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'upgrades a easy_install_package with an explicit action' do
7
7
  expect(chef_run).to upgrade_easy_install_package('explicit_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'erl_call::run' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'runs a erl_call with the default action' do
7
7
  expect(chef_run).to run_erl_call('default_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'execute::run' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'runs a execute with the default action' do
7
7
  expect(chef_run).to run_execute('default_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'expect_exception::compile_error' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'raises an error' do
7
7
  expect(Chef::Formatters::ErrorMapper).to_not receive(:file_load_failed)
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'expect_exception::converge_error' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'raises an error' do
7
7
  expect(Chef::Formatters::ErrorMapper).to_not receive(:file_load_failed)
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'expect_exception::no_error' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'does not raise an error' do
7
7
  expect(Chef::Formatters::ErrorMapper).to_not receive(:file_load_failed)
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'file::create_if_missing' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'creates a file with an explicit action' do
7
7
  expect(chef_run).to create_file_if_missing('/tmp/explicit_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'file::create' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'creates a file with the default action' do
7
7
  expect(chef_run).to create_file('/tmp/default_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'file::delete' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'deletes a file with an explicit action' do
7
7
  expect(chef_run).to delete_file('/tmp/explicit_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'file::touch' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'touches a file with an explicit action' do
7
7
  expect(chef_run).to touch_file('/tmp/explicit_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'gem_package::install' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'installs a gem_package with the default action' do
7
7
  expect(chef_run).to install_gem_package('default_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'gem_package::purge' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'purges a gem_package with an explicit action' do
7
7
  expect(chef_run).to purge_gem_package('explicit_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'gem_package::reconfig' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'reconfigs a gem_package with an explicit action' do
7
7
  expect(chef_run).to reconfig_gem_package('explicit_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'gem_package::remove' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'removes a gem_package with an explicit action' do
7
7
  expect(chef_run).to remove_gem_package('explicit_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'gem_package::upgrade' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'upgrades a gem_package with an explicit action' do
7
7
  expect(chef_run).to upgrade_gem_package('explicit_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'git::checkout' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'checkouts a git with an explicit action' do
7
7
  expect(chef_run).to checkout_git('/tmp/explicit_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'git::export' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'exports a git with an explicit action' do
7
7
  expect(chef_run).to export_git('/tmp/explicit_action')
@@ -1,7 +1,7 @@
1
1
  require 'chefspec'
2
2
 
3
3
  describe 'git::sync' do
4
- let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
4
+ let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
5
5
 
6
6
  it 'syncs a git with the default action' do
7
7
  expect(chef_run).to sync_git('/tmp/default_action')