chefspec 4.0.2 → 4.1.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 (264) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -1
  3. data/CHANGELOG.md +19 -0
  4. data/README.md +84 -87
  5. data/chefspec.gemspec +1 -1
  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/attributes/spec/default_spec.rb +1 -1
  12. data/examples/batch/spec/run_spec.rb +1 -1
  13. data/examples/cached/spec/default_spec.rb +1 -1
  14. data/examples/chef_gem/spec/install_spec.rb +1 -1
  15. data/examples/chef_gem/spec/purge_spec.rb +1 -1
  16. data/examples/chef_gem/spec/reconfig_spec.rb +1 -1
  17. data/examples/chef_gem/spec/remove_spec.rb +1 -1
  18. data/examples/chef_gem/spec/upgrade_spec.rb +1 -1
  19. data/examples/compile_time/spec/default_spec.rb +1 -1
  20. data/examples/cookbook_file/spec/create_if_missing_spec.rb +1 -1
  21. data/examples/cookbook_file/spec/create_spec.rb +1 -1
  22. data/examples/cookbook_file/spec/delete_spec.rb +1 -1
  23. data/examples/cookbook_file/spec/touch_spec.rb +1 -1
  24. data/examples/cron/spec/create_spec.rb +1 -1
  25. data/examples/cron/spec/delete_spec.rb +1 -1
  26. data/examples/custom_matcher/libraries/matcher.rb +1 -1
  27. data/examples/custom_matcher/spec/install_spec.rb +1 -1
  28. data/examples/custom_matcher/spec/remove_spec.rb +1 -1
  29. data/examples/deploy/spec/deploy_spec.rb +1 -1
  30. data/examples/deploy/spec/force_deploy_spec.rb +1 -1
  31. data/examples/deploy/spec/rollback_spec.rb +1 -1
  32. data/examples/directory/spec/create_spec.rb +1 -1
  33. data/examples/directory/spec/delete_spec.rb +1 -1
  34. data/examples/do_nothing/spec/default_spec.rb +1 -1
  35. data/examples/dpkg_package/spec/install_spec.rb +1 -1
  36. data/examples/dpkg_package/spec/purge_spec.rb +1 -1
  37. data/examples/dpkg_package/spec/remove_spec.rb +1 -1
  38. data/examples/easy_install_package/spec/install_spec.rb +1 -1
  39. data/examples/easy_install_package/spec/purge_spec.rb +1 -1
  40. data/examples/easy_install_package/spec/remove_spec.rb +1 -1
  41. data/examples/easy_install_package/spec/upgrade_spec.rb +1 -1
  42. data/examples/env/spec/create_spec.rb +1 -1
  43. data/examples/env/spec/delete_spec.rb +1 -1
  44. data/examples/env/spec/modify_spec.rb +1 -1
  45. data/examples/erl_call/spec/run_spec.rb +1 -1
  46. data/examples/execute/spec/run_spec.rb +1 -1
  47. data/examples/expect_exception/spec/compile_error_spec.rb +1 -1
  48. data/examples/expect_exception/spec/converge_error_spec.rb +1 -1
  49. data/examples/expect_exception/spec/no_error_spec.rb +1 -1
  50. data/examples/file/spec/create_if_missing_spec.rb +1 -1
  51. data/examples/file/spec/create_spec.rb +1 -1
  52. data/examples/file/spec/delete_spec.rb +1 -1
  53. data/examples/file/spec/touch_spec.rb +1 -1
  54. data/examples/freebsd_package/spec/install_spec.rb +1 -1
  55. data/examples/freebsd_package/spec/remove_spec.rb +1 -1
  56. data/examples/gem_package/spec/install_spec.rb +1 -1
  57. data/examples/gem_package/spec/purge_spec.rb +1 -1
  58. data/examples/gem_package/spec/reconfig_spec.rb +1 -1
  59. data/examples/gem_package/spec/remove_spec.rb +1 -1
  60. data/examples/gem_package/spec/upgrade_spec.rb +1 -1
  61. data/examples/git/spec/checkout_spec.rb +1 -1
  62. data/examples/git/spec/export_spec.rb +1 -1
  63. data/examples/git/spec/sync_spec.rb +1 -1
  64. data/examples/group/spec/create_spec.rb +1 -1
  65. data/examples/group/spec/manage_spec.rb +1 -1
  66. data/examples/group/spec/modify_spec.rb +1 -1
  67. data/examples/group/spec/remove_spec.rb +1 -1
  68. data/examples/guards/spec/default_spec.rb +1 -1
  69. data/examples/heavy_provider_light_resource/spec/provider_service_spec.rb +1 -1
  70. data/examples/http_request/spec/delete_spec.rb +1 -1
  71. data/examples/http_request/spec/get_spec.rb +1 -1
  72. data/examples/http_request/spec/head_spec.rb +1 -1
  73. data/examples/http_request/spec/options_spec.rb +1 -1
  74. data/examples/http_request/spec/post_spec.rb +1 -1
  75. data/examples/http_request/spec/put_spec.rb +1 -1
  76. data/examples/ifconfig/spec/add_spec.rb +1 -1
  77. data/examples/ifconfig/spec/delete_spec.rb +1 -1
  78. data/examples/ifconfig/spec/disable_spec.rb +1 -1
  79. data/examples/ifconfig/spec/enable_spec.rb +1 -1
  80. data/examples/include_recipe/spec/default_spec.rb +1 -1
  81. data/examples/inherits/spec/default_spec.rb +1 -1
  82. data/examples/ips_package/spec/install_spec.rb +1 -1
  83. data/examples/ips_package/spec/remove_spec.rb +1 -1
  84. data/examples/ips_package/spec/upgrade_spec.rb +1 -1
  85. data/examples/link/spec/create_spec.rb +1 -1
  86. data/examples/link/spec/delete_spec.rb +1 -1
  87. data/examples/link/spec/link_to_spec.rb +1 -1
  88. data/examples/log/spec/write_spec.rb +1 -1
  89. data/examples/macports_package/spec/install_spec.rb +1 -1
  90. data/examples/macports_package/spec/purge_spec.rb +1 -1
  91. data/examples/macports_package/spec/remove_spec.rb +1 -1
  92. data/examples/macports_package/spec/upgrade_spec.rb +1 -1
  93. data/examples/mdadm/spec/assemble_spec.rb +1 -1
  94. data/examples/mdadm/spec/create_spec.rb +1 -1
  95. data/examples/mdadm/spec/stop_spec.rb +1 -1
  96. data/examples/mount/spec/disable_spec.rb +1 -1
  97. data/examples/mount/spec/enable_spec.rb +1 -1
  98. data/examples/mount/spec/mount_spec.rb +1 -1
  99. data/examples/mount/spec/remount_spec.rb +1 -1
  100. data/examples/mount/spec/umount_spec.rb +1 -1
  101. data/examples/multiple_actions/spec/default_spec.rb +1 -1
  102. data/examples/multiple_actions/spec/sequential_spec.rb +4 -1
  103. data/examples/multiple_run_action/spec/default_spec.rb +1 -1
  104. data/examples/notifications/spec/chained_spec.rb +1 -1
  105. data/examples/notifications/spec/default_spec.rb +1 -1
  106. data/examples/notifications/spec/delayed_spec.rb +1 -1
  107. data/examples/notifications/spec/immediately_spec.rb +1 -1
  108. data/examples/ohai/spec/reload_spec.rb +1 -1
  109. data/examples/package/spec/install_spec.rb +1 -1
  110. data/examples/package/spec/purge_spec.rb +1 -1
  111. data/examples/package/spec/reconfig_spec.rb +1 -1
  112. data/examples/package/spec/remove_spec.rb +1 -1
  113. data/examples/package/spec/upgrade_spec.rb +1 -1
  114. data/examples/pacman_package/spec/install_spec.rb +1 -1
  115. data/examples/pacman_package/spec/purge_spec.rb +1 -1
  116. data/examples/pacman_package/spec/remove_spec.rb +1 -1
  117. data/examples/pacman_package/spec/upgrade_spec.rb +1 -1
  118. data/examples/portage_package/spec/install_spec.rb +1 -1
  119. data/examples/portage_package/spec/purge_spec.rb +1 -1
  120. data/examples/portage_package/spec/remove_spec.rb +1 -1
  121. data/examples/portage_package/spec/upgrade_spec.rb +1 -1
  122. data/examples/powershell_script/spec/run_spec.rb +1 -1
  123. data/examples/registry_key/spec/create_if_missing_spec.rb +1 -1
  124. data/examples/registry_key/spec/create_spec.rb +1 -1
  125. data/examples/registry_key/spec/delete_key_spec.rb +1 -1
  126. data/examples/registry_key/spec/delete_spec.rb +1 -1
  127. data/examples/remote_directory/spec/create_if_missing_spec.rb +1 -1
  128. data/examples/remote_directory/spec/create_spec.rb +1 -1
  129. data/examples/remote_directory/spec/delete_spec.rb +1 -1
  130. data/examples/remote_file/spec/create_if_missing_spec.rb +1 -1
  131. data/examples/remote_file/spec/create_spec.rb +1 -1
  132. data/examples/remote_file/spec/delete_spec.rb +1 -1
  133. data/examples/remote_file/spec/touch_spec.rb +1 -1
  134. data/examples/render_file/spec/default_spec.rb +1 -1
  135. data/examples/render_file/spec/template_helpers_spec.rb +1 -1
  136. data/examples/roles/spec/default_spec.rb +1 -1
  137. data/examples/route/spec/add_spec.rb +1 -1
  138. data/examples/route/spec/delete_spec.rb +1 -1
  139. data/examples/rpm_package/spec/install_spec.rb +1 -1
  140. data/examples/rpm_package/spec/remove_spec.rb +1 -1
  141. data/examples/rpm_package/spec/upgrade_spec.rb +1 -1
  142. data/examples/ruby_block/spec/run_spec.rb +1 -1
  143. data/examples/script/spec/run_bash_spec.rb +1 -1
  144. data/examples/script/spec/run_csh_spec.rb +1 -1
  145. data/examples/script/spec/run_perl_spec.rb +1 -1
  146. data/examples/script/spec/run_python_spec.rb +1 -1
  147. data/examples/script/spec/run_ruby_spec.rb +1 -1
  148. data/examples/script/spec/run_script_spec.rb +1 -1
  149. data/examples/server/spec/client_spec.rb +5 -4
  150. data/examples/server/spec/data_bag_spec.rb +10 -9
  151. data/examples/server/spec/environment_spec.rb +5 -4
  152. data/examples/server/spec/node_spec.rb +20 -14
  153. data/examples/server/spec/render_with_cached_spec.rb +1 -2
  154. data/examples/server/spec/role_spec.rb +5 -4
  155. data/examples/server/spec/search_spec.rb +7 -8
  156. data/examples/service/spec/disable_spec.rb +1 -1
  157. data/examples/service/spec/enable_spec.rb +1 -1
  158. data/examples/service/spec/reload_spec.rb +1 -1
  159. data/examples/service/spec/restart_spec.rb +1 -1
  160. data/examples/service/spec/start_spec.rb +1 -1
  161. data/examples/service/spec/stop_spec.rb +1 -1
  162. data/examples/smartos_package/spec/install_spec.rb +1 -1
  163. data/examples/smartos_package/spec/remove_spec.rb +1 -1
  164. data/examples/smartos_package/spec/upgrade_spec.rb +1 -1
  165. data/examples/solaris_package/spec/install_spec.rb +1 -1
  166. data/examples/solaris_package/spec/remove_spec.rb +1 -1
  167. data/examples/state_attrs/spec/default_spec.rb +2 -2
  168. data/examples/step_into/spec/default_spec.rb +5 -2
  169. data/examples/stub_command/spec/default_spec.rb +1 -1
  170. data/examples/stub_data_bag/spec/default_spec.rb +1 -1
  171. data/examples/stub_data_bag_item/spec/default_spec.rb +1 -1
  172. data/examples/stub_search/spec/default_spec.rb +1 -1
  173. data/examples/subscribes/spec/chained_spec.rb +1 -1
  174. data/examples/subscribes/spec/default_spec.rb +1 -1
  175. data/examples/subscribes/spec/delayed_spec.rb +1 -1
  176. data/examples/subscribes/spec/immediately_spec.rb +1 -1
  177. data/examples/subversion/spec/checkout_spec.rb +1 -1
  178. data/examples/subversion/spec/export_spec.rb +1 -1
  179. data/examples/subversion/spec/force_export_spec.rb +1 -1
  180. data/examples/subversion/spec/sync_spec.rb +1 -1
  181. data/examples/template/spec/create_if_missing_spec.rb +1 -1
  182. data/examples/template/spec/create_spec.rb +1 -1
  183. data/examples/template/spec/delete_spec.rb +1 -1
  184. data/examples/template/spec/touch_spec.rb +1 -1
  185. data/examples/use_inline_resources/spec/default_spec.rb +4 -1
  186. data/examples/user/spec/create_spec.rb +1 -1
  187. data/examples/user/spec/lock_spec.rb +1 -1
  188. data/examples/user/spec/manage_spec.rb +1 -1
  189. data/examples/user/spec/modify_spec.rb +1 -1
  190. data/examples/user/spec/remove_spec.rb +1 -1
  191. data/examples/user/spec/unlock_spec.rb +1 -1
  192. data/examples/yum_package/spec/install_spec.rb +1 -1
  193. data/examples/yum_package/spec/purge_spec.rb +1 -1
  194. data/examples/yum_package/spec/remove_spec.rb +1 -1
  195. data/examples/yum_package/spec/upgrade_spec.rb +1 -1
  196. data/features/batch.feature +0 -3
  197. data/features/powershell_script.feature +0 -3
  198. data/features/render_file.feature +1 -6
  199. data/features/server.feature +0 -3
  200. data/features/smartos_package.feature +0 -4
  201. data/features/solaris_package.feature +0 -4
  202. data/features/state_attrs.feature +0 -4
  203. data/features/support/env.rb +0 -7
  204. data/gemfiles/{chef-11.12.0.gemfile → chef-11.16.0.gemfile} +1 -1
  205. data/gemfiles/chef-12.0.0.alpha.gemfile +5 -0
  206. data/lib/chefspec.rb +46 -14
  207. data/lib/chefspec/api.rb +0 -2
  208. data/lib/chefspec/api/apt_package.rb +1 -1
  209. data/lib/chefspec/api/batch.rb +1 -1
  210. data/lib/chefspec/api/chef_gem.rb +1 -1
  211. data/lib/chefspec/api/cookbook_file.rb +1 -1
  212. data/lib/chefspec/api/cron.rb +1 -1
  213. data/lib/chefspec/api/deploy.rb +1 -1
  214. data/lib/chefspec/api/directory.rb +1 -1
  215. data/lib/chefspec/api/dpkg_package.rb +1 -1
  216. data/lib/chefspec/api/easy_install_package.rb +1 -1
  217. data/lib/chefspec/api/env.rb +1 -1
  218. data/lib/chefspec/api/erl_call.rb +1 -1
  219. data/lib/chefspec/api/execute.rb +1 -1
  220. data/lib/chefspec/api/file.rb +1 -1
  221. data/lib/chefspec/api/freebsd_package.rb +1 -1
  222. data/lib/chefspec/api/gem_package.rb +1 -1
  223. data/lib/chefspec/api/git.rb +1 -1
  224. data/lib/chefspec/api/group.rb +1 -1
  225. data/lib/chefspec/api/http_request.rb +1 -1
  226. data/lib/chefspec/api/ifconfig.rb +1 -1
  227. data/lib/chefspec/api/ips_package.rb +1 -1
  228. data/lib/chefspec/api/link.rb +1 -1
  229. data/lib/chefspec/api/log.rb +1 -1
  230. data/lib/chefspec/api/macports_package.rb +1 -1
  231. data/lib/chefspec/api/mdadm.rb +1 -1
  232. data/lib/chefspec/api/mount.rb +1 -1
  233. data/lib/chefspec/api/ohai.rb +2 -2
  234. data/lib/chefspec/api/package.rb +1 -1
  235. data/lib/chefspec/api/pacman_package.rb +1 -1
  236. data/lib/chefspec/api/portage_package.rb +1 -1
  237. data/lib/chefspec/api/powershell_script.rb +1 -1
  238. data/lib/chefspec/api/registry_key.rb +1 -1
  239. data/lib/chefspec/api/remote_directory.rb +4 -4
  240. data/lib/chefspec/api/remote_file.rb +1 -1
  241. data/lib/chefspec/api/route.rb +1 -1
  242. data/lib/chefspec/api/rpm_package.rb +1 -1
  243. data/lib/chefspec/api/ruby_block.rb +1 -1
  244. data/lib/chefspec/api/script.rb +6 -6
  245. data/lib/chefspec/api/service.rb +1 -1
  246. data/lib/chefspec/api/smartos_package.rb +1 -1
  247. data/lib/chefspec/api/solaris_package.rb +1 -1
  248. data/lib/chefspec/api/subversion.rb +1 -1
  249. data/lib/chefspec/api/template.rb +1 -1
  250. data/lib/chefspec/api/user.rb +1 -1
  251. data/lib/chefspec/api/yum_package.rb +1 -1
  252. data/lib/chefspec/coverage/filters.rb +3 -0
  253. data/lib/chefspec/deprecations.rb +19 -123
  254. data/lib/chefspec/macros.rb +2 -2
  255. data/lib/chefspec/matchers/render_file_matcher.rb +2 -2
  256. data/lib/chefspec/matchers/resource_matcher.rb +1 -1
  257. data/lib/chefspec/matchers/state_attrs_matcher.rb +1 -1
  258. data/lib/chefspec/server.rb +4 -361
  259. data/lib/chefspec/server_methods.rb +175 -0
  260. data/lib/chefspec/server_runner.rb +86 -0
  261. data/lib/chefspec/{runner.rb → solo_runner.rb} +92 -43
  262. data/lib/chefspec/version.rb +1 -1
  263. data/spec/unit/{runner_spec.rb → solo_runner_spec.rb} +31 -25
  264. metadata +13 -10
data/lib/chefspec/api.rb CHANGED
@@ -1,5 +1,3 @@
1
- require_relative 'runner'
2
-
3
1
  module ChefSpec
4
2
  module API
5
3
  extend self
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 3.0.0
3
3
  module AptPackageMatchers
4
- ChefSpec::Runner.define_runner_method :apt_package
4
+ ChefSpec.define_matcher :apt_package
5
5
 
6
6
  #
7
7
  # Assert that an +apt_package+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 3.0.0
3
3
  module BatchMatchers
4
- ChefSpec::Runner.define_runner_method :batch
4
+ ChefSpec.define_matcher :batch
5
5
 
6
6
  #
7
7
  # Assert that a +batch+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 0.8.0
3
3
  module ChefGemMatchers
4
- ChefSpec::Runner.define_runner_method :chef_gem
4
+ ChefSpec.define_matcher :chef_gem
5
5
 
6
6
  #
7
7
  # Assert that a +chef_gem+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 0.0.1
3
3
  module CookbookFileMatchers
4
- ChefSpec::Runner.define_runner_method :cookbook_file
4
+ ChefSpec.define_matcher :cookbook_file
5
5
 
6
6
  #
7
7
  # Assert that a +cookbook_file+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 0.7.0
3
3
  module CronMatchers
4
- ChefSpec::Runner.define_runner_method :cron
4
+ ChefSpec.define_matcher :cron
5
5
 
6
6
  #
7
7
  # Assert that a +cron+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 3.0.0
3
3
  module DeployMatchers
4
- ChefSpec::Runner.define_runner_method :deploy
4
+ ChefSpec.define_matcher :deploy
5
5
 
6
6
  #
7
7
  # Assert that a +deploy+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 0.0.1
3
3
  module DirectoryMatchers
4
- ChefSpec::Runner.define_runner_method :directory
4
+ ChefSpec.define_matcher :directory
5
5
 
6
6
  #
7
7
  # Assert that a +directory+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 3.0.0
3
3
  module DpkgPackageMatchers
4
- ChefSpec::Runner.define_runner_method :dpkg_package
4
+ ChefSpec.define_matcher :dpkg_package
5
5
 
6
6
  #
7
7
  # Assert that a +dpkg_package+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 3.0.0
3
3
  module EasyInstallPackageMatchers
4
- ChefSpec::Runner.define_runner_method :easy_install_package
4
+ ChefSpec.define_matcher :easy_install_package
5
5
 
6
6
  #
7
7
  # Assert that an +easy_install_package+ resource exists in the Chef run
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 0.9.0
3
3
  module EnvMatchers
4
- ChefSpec::Runner.define_runner_method :env
4
+ ChefSpec.define_matcher :env
5
5
 
6
6
  #
7
7
  # Assert that an +env+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 3.0.0
3
3
  module ErlCallMatchers
4
- ChefSpec::Runner.define_runner_method :erl_call
4
+ ChefSpec.define_matcher :erl_call
5
5
 
6
6
  #
7
7
  # Assert that an +erl_call+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 0.0.1
3
3
  module ExecuteMatchers
4
- ChefSpec::Runner.define_runner_method :execute
4
+ ChefSpec.define_matcher :execute
5
5
 
6
6
  #
7
7
  # Assert that an +execute+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 0.0.1
3
3
  module FileMatchers
4
- ChefSpec::Runner.define_runner_method :file
4
+ ChefSpec.define_matcher :file
5
5
 
6
6
  #
7
7
  # Assert that a +file+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 3.0.0
3
3
  module FreebsdPackageMatchers
4
- ChefSpec::Runner.define_runner_method :freebsd_package
4
+ ChefSpec.define_matcher :freebsd_package
5
5
 
6
6
  #
7
7
  # Assert that a +freebsd_package+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 0.5.0
3
3
  module GemPackageMatchers
4
- ChefSpec::Runner.define_runner_method :gem_package
4
+ ChefSpec.define_matcher :gem_package
5
5
 
6
6
  #
7
7
  # Assert that a +gem_package+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 3.0.0
3
3
  module GitMatchers
4
- ChefSpec::Runner.define_runner_method :git
4
+ ChefSpec.define_matcher :git
5
5
 
6
6
  #
7
7
  # Assert that a +git+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 1.0.0
3
3
  module GroupMatchers
4
- ChefSpec::Runner.define_runner_method :group
4
+ ChefSpec.define_matcher :group
5
5
 
6
6
  #
7
7
  # Assert that a +group+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 3.0.0
3
3
  module HttpRequestMatchers
4
- ChefSpec::Runner.define_runner_method :http_request
4
+ ChefSpec.define_matcher :http_request
5
5
 
6
6
  #
7
7
  # Assert that an +http_request+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 3.0.0
3
3
  module IfconfigMatchers
4
- ChefSpec::Runner.define_runner_method :ifconfig
4
+ ChefSpec.define_matcher :ifconfig
5
5
 
6
6
  #
7
7
  # Assert that an +ifconfig+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 3.0.0
3
3
  module IpsPackageMatchers
4
- ChefSpec::Runner.define_runner_method :ips_package
4
+ ChefSpec.define_matcher :ips_package
5
5
 
6
6
  #
7
7
  # Assert that an +ips_package+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 1.1.0
3
3
  module LinkMatchers
4
- ChefSpec::Runner.define_runner_method :link
4
+ ChefSpec.define_matcher :link
5
5
 
6
6
  #
7
7
  # Assert that a +link+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 3.0.0
3
3
  module LogMatchers
4
- ChefSpec::Runner.define_runner_method :log
4
+ ChefSpec.define_matcher :log
5
5
 
6
6
  #
7
7
  # Assert that a +log+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 3.0.0
3
3
  module MacportsPackageMatchers
4
- ChefSpec::Runner.define_runner_method :macports_package
4
+ ChefSpec.define_matcher :macports_package
5
5
 
6
6
  #
7
7
  # Assert that a +macports_package+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 3.0.0
3
3
  module MdadmMatchers
4
- ChefSpec::Runner.define_runner_method :mdadm
4
+ ChefSpec.define_matcher :mdadm
5
5
 
6
6
  #
7
7
  # Assert that a +mdadm+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 3.0.0
3
3
  module MountMatchers
4
- ChefSpec::Runner.define_runner_method :mount
4
+ ChefSpec.define_matcher :mount
5
5
 
6
6
  #
7
7
  # Assert that a +mount+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 3.0.0
3
3
  module OhaiMatchers
4
- ChefSpec::Runner.define_runner_method :ohai
4
+ ChefSpec.define_matcher :ohai
5
5
 
6
6
  #
7
7
  # Assert that an +ohai+ resource exists in the Chef run with the
@@ -25,7 +25,7 @@ module ChefSpec::API
25
25
  # expect(chef_run).to reload_ohai('reload').with(system: true)
26
26
  #
27
27
  # @example Assert that an +ohai+ was reloaded using a regex
28
- # expect(chef_run).to reload_ohai('reload').with(system: Boolean)
28
+ # expect(chef_run).to reload_ohai('reload').with(system: /true/)
29
29
  #
30
30
  # @example Assert that an +ohai+ was _not_ reloaded
31
31
  # expect(chef_run).to_not reload_ohai('reload')
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 0.0.1
3
3
  module PackageMatchers
4
- ChefSpec::Runner.define_runner_method :package
4
+ ChefSpec.define_matcher :package
5
5
 
6
6
  #
7
7
  # Assert that an +package+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 3.0.0
3
3
  module PacmanPackageMatchers
4
- ChefSpec::Runner.define_runner_method :pacman_package
4
+ ChefSpec.define_matcher :pacman_package
5
5
 
6
6
  #
7
7
  # Assert that an +pacman_package+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 3.0.0
3
3
  module PortagePackageMatchers
4
- ChefSpec::Runner.define_runner_method :portage_package
4
+ ChefSpec.define_matcher :portage_package
5
5
 
6
6
  #
7
7
  # Assert that an +portage_package+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 3.0.0
3
3
  module PowershellScriptMatchers
4
- ChefSpec::Runner.define_runner_method :powershell_script
4
+ ChefSpec.define_matcher :powershell_script
5
5
 
6
6
  #
7
7
  # Assert that a +powershell_script+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 3.0.0
3
3
  module RegistryKeyMatchers
4
- ChefSpec::Runner.define_runner_method :registry_key
4
+ ChefSpec.define_matcher :registry_key
5
5
 
6
6
  #
7
7
  # Assert that a +registry_key+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 3.0.0
3
3
  module RemoteDirectoryMatchers
4
- ChefSpec::Runner.define_runner_method :remote_directory
4
+ ChefSpec.define_matcher :remote_directory
5
5
 
6
6
  #
7
7
  # Assert that a +remote_directory+ resource exists in the Chef run with the
@@ -25,7 +25,7 @@ module ChefSpec::API
25
25
  # expect(chef_run).to create_remote_directory('/tmp').with(overwrite: true)
26
26
  #
27
27
  # @example Assert that a +remote_directory+ was createed using a regex
28
- # expect(chef_run).to create_remote_directory('/tmp').with(overwrite: Boolean)
28
+ # expect(chef_run).to create_remote_directory('/tmp').with(overwrite: /true/)
29
29
  #
30
30
  # @example Assert that a +remote_directory+ was _not_ createed
31
31
  # expect(chef_run).to_not create_remote_directory('/tmp')
@@ -65,7 +65,7 @@ module ChefSpec::API
65
65
  # expect(chef_run).to create_remote_directory_if_missing('/tmp/config').with(overwrite: true)
66
66
  #
67
67
  # @example Assert that a +remote_directory+ was created if missing using a regex
68
- # expect(chef_run).to create_remote_directory_if_missing('/tmp/config').with(overwrite: Boolean)
68
+ # expect(chef_run).to create_remote_directory_if_missing('/tmp/config').with(overwrite: /true/)
69
69
  #
70
70
  # @example Assert that a +remote_directory+ was _not_ created if missing
71
71
  # expect(chef_run).to_not create_remote_directory('/tmp/config')
@@ -102,7 +102,7 @@ module ChefSpec::API
102
102
  # expect(chef_run).to delete_remote_directory('/tmp').with(overwrite: true)
103
103
  #
104
104
  # @example Assert that a +remote_directory+ was deleteed using a regex
105
- # expect(chef_run).to delete_remote_directory('/tmp').with(overwrite: Boolean)
105
+ # expect(chef_run).to delete_remote_directory('/tmp').with(overwrite: /true/)
106
106
  #
107
107
  # @example Assert that a +remote_directory+ was _not_ deleteed
108
108
  # expect(chef_run).to_not delete_remote_directory('/tmp')
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 1.0.0
3
3
  module RemoteFileMatchers
4
- ChefSpec::Runner.define_runner_method :remote_file
4
+ ChefSpec.define_matcher :remote_file
5
5
 
6
6
  #
7
7
  # Assert that a +remote_file+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 3.0.0
3
3
  module RouteMatchers
4
- ChefSpec::Runner.define_runner_method :route
4
+ ChefSpec.define_matcher :route
5
5
 
6
6
  #
7
7
  # Assert that a +route+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 3.0.0
3
3
  module RpmPackageMatchers
4
- ChefSpec::Runner.define_runner_method :rpm_package
4
+ ChefSpec.define_matcher :rpm_package
5
5
 
6
6
  #
7
7
  # Assert that a +rpm_package+ resource exists in the Chef run with the
@@ -1,7 +1,7 @@
1
1
  module ChefSpec::API
2
2
  # @since 0.5.0
3
3
  module RubyBlockMatchers
4
- ChefSpec::Runner.define_runner_method :ruby_block
4
+ ChefSpec.define_matcher :ruby_block
5
5
 
6
6
  #
7
7
  # Assert that a +ruby_block+ resource exists in the Chef run with the
@@ -38,7 +38,7 @@ module ChefSpec::API
38
38
  ChefSpec::Matchers::ResourceMatcher.new(:bash, :run, resource_name)
39
39
  end
40
40
 
41
- ChefSpec::Runner.define_runner_method :bash
41
+ ChefSpec.define_matcher :bash
42
42
 
43
43
  #
44
44
  # Assert that a +csh+ resource exists in the Chef run with the
@@ -77,7 +77,7 @@ module ChefSpec::API
77
77
  ChefSpec::Matchers::ResourceMatcher.new(:csh, :run, resource_name)
78
78
  end
79
79
 
80
- ChefSpec::Runner.define_runner_method :csh
80
+ ChefSpec.define_matcher :csh
81
81
 
82
82
  #
83
83
  # Assert that a +perl+ resource exists in the Chef run with the
@@ -116,7 +116,7 @@ module ChefSpec::API
116
116
  ChefSpec::Matchers::ResourceMatcher.new(:perl, :run, resource_name)
117
117
  end
118
118
 
119
- ChefSpec::Runner.define_runner_method :perl
119
+ ChefSpec.define_matcher :perl
120
120
 
121
121
  #
122
122
  # Assert that a +python+ resource exists in the Chef run with the
@@ -155,7 +155,7 @@ module ChefSpec::API
155
155
  ChefSpec::Matchers::ResourceMatcher.new(:python, :run, resource_name)
156
156
  end
157
157
 
158
- ChefSpec::Runner.define_runner_method :python
158
+ ChefSpec.define_matcher :python
159
159
 
160
160
  #
161
161
  # Assert that a +ruby+ resource exists in the Chef run with the
@@ -194,7 +194,7 @@ module ChefSpec::API
194
194
  ChefSpec::Matchers::ResourceMatcher.new(:ruby, :run, resource_name)
195
195
  end
196
196
 
197
- ChefSpec::Runner.define_runner_method :ruby
197
+ ChefSpec.define_matcher :ruby
198
198
 
199
199
  #
200
200
  # Assert that a +script+ resource exists in the Chef run with the
@@ -234,6 +234,6 @@ module ChefSpec::API
234
234
  end
235
235
 
236
236
 
237
- ChefSpec::Runner.define_runner_method :script
237
+ ChefSpec.define_matcher :script
238
238
  end
239
239
  end