chefspec 7.0.0 → 9.3.8

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 (830) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile +28 -10
  3. data/Rakefile +74 -18
  4. data/chefspec.gemspec +26 -28
  5. data/lib/chefspec/api/core.rb +217 -0
  6. data/lib/chefspec/api/described.rb +53 -0
  7. data/lib/chefspec/api/do_nothing.rb +23 -21
  8. data/lib/chefspec/api/include_any_recipe.rb +24 -0
  9. data/lib/chefspec/api/include_recipe.rb +25 -23
  10. data/lib/chefspec/api/link.rb +24 -98
  11. data/lib/chefspec/api/notifications.rb +37 -35
  12. data/lib/chefspec/api/reboot.rb +9 -13
  13. data/lib/chefspec/api/render_file.rb +34 -32
  14. data/lib/chefspec/api/state_attrs.rb +27 -25
  15. data/lib/chefspec/api/stubs.rb +183 -0
  16. data/lib/chefspec/api/stubs_for.rb +139 -0
  17. data/lib/chefspec/api/subscriptions.rb +34 -32
  18. data/lib/chefspec/api/user.rb +221 -219
  19. data/lib/chefspec/api.rb +32 -89
  20. data/lib/chefspec/berkshelf.rb +5 -5
  21. data/lib/chefspec/cacher.rb +2 -2
  22. data/lib/chefspec/coverage/filters.rb +18 -15
  23. data/lib/chefspec/coverage.rb +36 -40
  24. data/lib/chefspec/deprecations.rb +5 -14
  25. data/lib/chefspec/errors.rb +8 -7
  26. data/lib/chefspec/expect_exception.rb +2 -1
  27. data/lib/chefspec/extensions/chef/client.rb +6 -7
  28. data/lib/chefspec/extensions/chef/conditional.rb +5 -3
  29. data/lib/chefspec/extensions/chef/cookbook/gem_installer.rb +33 -0
  30. data/lib/chefspec/extensions/chef/cookbook_loader.rb +14 -0
  31. data/lib/chefspec/extensions/chef/cookbook_uploader.rb +4 -3
  32. data/lib/chefspec/extensions/chef/data_query.rb +8 -11
  33. data/lib/chefspec/extensions/chef/lwrp_base.rb +18 -21
  34. data/lib/chefspec/extensions/chef/provider.rb +39 -0
  35. data/lib/chefspec/extensions/chef/resource/freebsd_package.rb +15 -17
  36. data/lib/chefspec/extensions/chef/resource.rb +148 -9
  37. data/lib/chefspec/extensions/chef/run_context/cookbook_compiler.rb +84 -0
  38. data/lib/chefspec/extensions/chef/securable.rb +1 -1
  39. data/lib/chefspec/extensions/ohai/system.rb +11 -0
  40. data/lib/chefspec/extensions.rb +21 -0
  41. data/lib/chefspec/file_cache_path_proxy.rb +3 -3
  42. data/lib/chefspec/formatter.rb +15 -3
  43. data/lib/chefspec/librarian.rb +7 -6
  44. data/lib/chefspec/matchers/do_nothing_matcher.rb +15 -15
  45. data/lib/chefspec/matchers/include_any_recipe_matcher.rb +51 -0
  46. data/lib/chefspec/matchers/include_recipe_matcher.rb +1 -1
  47. data/lib/chefspec/matchers/link_to_matcher.rb +2 -2
  48. data/lib/chefspec/matchers/notifications_matcher.rb +5 -4
  49. data/lib/chefspec/matchers/render_file_matcher.rb +39 -29
  50. data/lib/chefspec/matchers/resource_matcher.rb +19 -17
  51. data/lib/chefspec/matchers.rb +9 -8
  52. data/lib/chefspec/mixins/normalize.rb +1 -1
  53. data/lib/chefspec/policyfile.rb +16 -9
  54. data/lib/chefspec/renderer.rb +4 -4
  55. data/lib/chefspec/rspec.rb +4 -8
  56. data/lib/chefspec/runner.rb +8 -0
  57. data/lib/chefspec/server.rb +1 -1
  58. data/lib/chefspec/server_methods.rb +9 -9
  59. data/lib/chefspec/server_runner.rb +21 -17
  60. data/lib/chefspec/solo_runner.rb +148 -42
  61. data/lib/chefspec/stubs/command_registry.rb +1 -1
  62. data/lib/chefspec/stubs/command_stub.rb +1 -1
  63. data/lib/chefspec/stubs/data_bag_item_registry.rb +1 -1
  64. data/lib/chefspec/stubs/data_bag_item_stub.rb +1 -1
  65. data/lib/chefspec/stubs/data_bag_registry.rb +1 -1
  66. data/lib/chefspec/stubs/data_bag_stub.rb +1 -1
  67. data/lib/chefspec/stubs/registry.rb +1 -1
  68. data/lib/chefspec/stubs/search_registry.rb +2 -2
  69. data/lib/chefspec/stubs/search_stub.rb +2 -2
  70. data/lib/chefspec/util.rb +7 -7
  71. data/lib/chefspec/version.rb +1 -1
  72. data/lib/chefspec/zero_server.rb +23 -21
  73. data/lib/chefspec.rb +29 -36
  74. data/spec/spec_helper.rb +3 -4
  75. data/spec/support/hash.rb +4 -4
  76. data/spec/unit/cacher_spec.rb +17 -17
  77. data/spec/unit/coverage/filters_spec.rb +16 -16
  78. data/spec/unit/deprecations_spec.rb +9 -35
  79. data/spec/unit/errors_spec.rb +15 -15
  80. data/spec/unit/expect_exception_spec.rb +9 -9
  81. data/spec/unit/macros_spec.rb +57 -57
  82. data/spec/unit/matchers/do_nothing_matcher.rb +1 -1
  83. data/spec/unit/matchers/include_any_recipe_matcher_spec.rb +52 -0
  84. data/spec/unit/matchers/include_recipe_matcher_spec.rb +15 -15
  85. data/spec/unit/matchers/link_to_matcher_spec.rb +18 -18
  86. data/spec/unit/matchers/notifications_matcher_spec.rb +15 -16
  87. data/spec/unit/matchers/render_file_matcher_spec.rb +31 -24
  88. data/spec/unit/matchers/resource_matcher_spec.rb +1 -1
  89. data/spec/unit/matchers/state_attrs_matcher_spec.rb +24 -24
  90. data/spec/unit/matchers/subscribes_matcher_spec.rb +27 -29
  91. data/spec/unit/renderer_spec.rb +36 -36
  92. data/spec/unit/server_runner_spec.rb +6 -6
  93. data/spec/unit/solo_runner_spec.rb +70 -70
  94. data/spec/unit/stubs/command_registry_spec.rb +11 -11
  95. data/spec/unit/stubs/command_stub_spec.rb +26 -26
  96. data/spec/unit/stubs/data_bag_item_registry_spec.rb +17 -17
  97. data/spec/unit/stubs/data_bag_item_stub_spec.rb +14 -14
  98. data/spec/unit/stubs/data_bag_registry_spec.rb +16 -16
  99. data/spec/unit/stubs/data_bag_stub_spec.rb +13 -13
  100. data/spec/unit/stubs/registry_spec.rb +9 -9
  101. data/spec/unit/stubs/search_registry_spec.rb +17 -17
  102. data/spec/unit/stubs/search_stub_spec.rb +14 -14
  103. data/spec/unit/stubs/stub_spec.rb +22 -22
  104. data/templates/errors/may_need_to_specify_platform.erb +3 -3
  105. data/templates/errors/shell_out_not_stubbed.erb +10 -0
  106. metadata +47 -902
  107. data/.gitignore +0 -16
  108. data/.travis.yml +0 -32
  109. data/CHANGELOG.md +0 -777
  110. data/CONTRIBUTING.md +0 -52
  111. data/ISSUES.md +0 -41
  112. data/README.md +0 -1230
  113. data/examples/apt_package/recipes/install.rb +0 -13
  114. data/examples/apt_package/recipes/purge.rb +0 -13
  115. data/examples/apt_package/recipes/reconfig.rb +0 -13
  116. data/examples/apt_package/recipes/remove.rb +0 -13
  117. data/examples/apt_package/recipes/upgrade.rb +0 -13
  118. data/examples/apt_package/spec/install_spec.rb +0 -26
  119. data/examples/apt_package/spec/purge_spec.rb +0 -22
  120. data/examples/apt_package/spec/reconfig_spec.rb +0 -22
  121. data/examples/apt_package/spec/remove_spec.rb +0 -22
  122. data/examples/apt_package/spec/upgrade_spec.rb +0 -22
  123. data/examples/apt_repository/recipes/add.rb +0 -8
  124. data/examples/apt_repository/recipes/remove.rb +0 -4
  125. data/examples/apt_repository/spec/add_spec.rb +0 -17
  126. data/examples/apt_repository/spec/remove_spec.rb +0 -12
  127. data/examples/apt_update/recipes/periodic.rb +0 -5
  128. data/examples/apt_update/recipes/update.rb +0 -3
  129. data/examples/apt_update/spec/periodic_spec.rb +0 -17
  130. data/examples/apt_update/spec/update_spec.rb +0 -12
  131. data/examples/attributes/attributes/default.rb +0 -1
  132. data/examples/attributes/recipes/default.rb +0 -4
  133. data/examples/attributes/spec/default_spec.rb +0 -20
  134. data/examples/batch/recipes/run.rb +0 -9
  135. data/examples/batch/spec/run_spec.rb +0 -22
  136. data/examples/bff_package/recipes/install.rb +0 -13
  137. data/examples/bff_package/recipes/purge.rb +0 -13
  138. data/examples/bff_package/recipes/remove.rb +0 -13
  139. data/examples/bff_package/recipes/upgrade.rb +0 -13
  140. data/examples/bff_package/spec/install_spec.rb +0 -23
  141. data/examples/bff_package/spec/purge_spec.rb +0 -19
  142. data/examples/bff_package/spec/remove_spec.rb +0 -19
  143. data/examples/bff_package/spec/upgrade_spec.rb +0 -19
  144. data/examples/cab_package/recipes/install.rb +0 -13
  145. data/examples/cab_package/recipes/remove.rb +0 -13
  146. data/examples/cab_package/spec/install_spec.rb +0 -26
  147. data/examples/cab_package/spec/remove_spec.rb +0 -22
  148. data/examples/cached/recipes/default.rb +0 -1
  149. data/examples/cached/spec/default_spec.rb +0 -13
  150. data/examples/chef_gem/recipes/install.rb +0 -18
  151. data/examples/chef_gem/recipes/purge.rb +0 -16
  152. data/examples/chef_gem/recipes/reconfig.rb +0 -16
  153. data/examples/chef_gem/recipes/remove.rb +0 -16
  154. data/examples/chef_gem/recipes/upgrade.rb +0 -16
  155. data/examples/chef_gem/spec/install_spec.rb +0 -23
  156. data/examples/chef_gem/spec/purge_spec.rb +0 -19
  157. data/examples/chef_gem/spec/reconfig_spec.rb +0 -19
  158. data/examples/chef_gem/spec/remove_spec.rb +0 -19
  159. data/examples/chef_gem/spec/upgrade_spec.rb +0 -19
  160. data/examples/chocolatey_package/recipes/install.rb +0 -6
  161. data/examples/chocolatey_package/recipes/remove.rb +0 -8
  162. data/examples/chocolatey_package/recipes/upgrade.rb +0 -8
  163. data/examples/chocolatey_package/spec/install_spec.rb +0 -19
  164. data/examples/chocolatey_package/spec/remove_spec.rb +0 -18
  165. data/examples/chocolatey_package/spec/upgrade_spec.rb +0 -18
  166. data/examples/compile_time/recipes/default.rb +0 -3
  167. data/examples/compile_time/spec/default_spec.rb +0 -27
  168. data/examples/cookbook_file/recipes/create.rb +0 -15
  169. data/examples/cookbook_file/recipes/create_if_missing.rb +0 -15
  170. data/examples/cookbook_file/recipes/delete.rb +0 -15
  171. data/examples/cookbook_file/recipes/touch.rb +0 -15
  172. data/examples/cookbook_file/spec/create_if_missing_spec.rb +0 -28
  173. data/examples/cookbook_file/spec/create_spec.rb +0 -32
  174. data/examples/cookbook_file/spec/delete_spec.rb +0 -19
  175. data/examples/cookbook_file/spec/touch_spec.rb +0 -19
  176. data/examples/cron/recipes/create.rb +0 -10
  177. data/examples/cron/recipes/delete.rb +0 -9
  178. data/examples/cron/spec/create_spec.rb +0 -19
  179. data/examples/cron/spec/delete_spec.rb +0 -15
  180. data/examples/custom_matcher/libraries/matcher.rb +0 -23
  181. data/examples/custom_matcher/providers/thing.rb +0 -2
  182. data/examples/custom_matcher/recipes/install.rb +0 -13
  183. data/examples/custom_matcher/recipes/remove.rb +0 -13
  184. data/examples/custom_matcher/resources/thing.rb +0 -5
  185. data/examples/custom_matcher/spec/install_spec.rb +0 -27
  186. data/examples/custom_matcher/spec/remove_spec.rb +0 -23
  187. data/examples/custom_resource/libraries/matchers.rb +0 -5
  188. data/examples/custom_resource/recipes/default.rb +0 -1
  189. data/examples/custom_resource/resources/custom_resource.rb +0 -9
  190. data/examples/custom_resource/spec/default_spec.rb +0 -18
  191. data/examples/deploy/recipes/deploy.rb +0 -10
  192. data/examples/deploy/recipes/force_deploy.rb +0 -9
  193. data/examples/deploy/recipes/rollback.rb +0 -9
  194. data/examples/deploy/spec/deploy_spec.rb +0 -15
  195. data/examples/deploy/spec/force_deploy_spec.rb +0 -15
  196. data/examples/deploy/spec/rollback_spec.rb +0 -15
  197. data/examples/directory/recipes/create.rb +0 -18
  198. data/examples/directory/recipes/delete.rb +0 -14
  199. data/examples/directory/spec/create_spec.rb +0 -34
  200. data/examples/directory/spec/delete_spec.rb +0 -26
  201. data/examples/dnf_package/recipes/install.rb +0 -13
  202. data/examples/dnf_package/recipes/purge.rb +0 -13
  203. data/examples/dnf_package/recipes/remove.rb +0 -13
  204. data/examples/dnf_package/recipes/upgrade.rb +0 -13
  205. data/examples/dnf_package/spec/install_spec.rb +0 -26
  206. data/examples/dnf_package/spec/purge_spec.rb +0 -22
  207. data/examples/dnf_package/spec/remove_spec.rb +0 -22
  208. data/examples/dnf_package/spec/upgrade_spec.rb +0 -22
  209. data/examples/do_nothing/recipes/default.rb +0 -3
  210. data/examples/do_nothing/spec/default_spec.rb +0 -15
  211. data/examples/dpkg_package/recipes/install.rb +0 -13
  212. data/examples/dpkg_package/recipes/purge.rb +0 -13
  213. data/examples/dpkg_package/recipes/remove.rb +0 -13
  214. data/examples/dpkg_package/spec/install_spec.rb +0 -26
  215. data/examples/dpkg_package/spec/purge_spec.rb +0 -22
  216. data/examples/dpkg_package/spec/remove_spec.rb +0 -22
  217. data/examples/dsc_resource/recipes/run.rb +0 -20
  218. data/examples/dsc_resource/spec/run_spec.rb +0 -38
  219. data/examples/dsc_script/recipes/run.rb +0 -12
  220. data/examples/dsc_script/spec/run_spec.rb +0 -16
  221. data/examples/env/recipes/create.rb +0 -13
  222. data/examples/env/recipes/delete.rb +0 -13
  223. data/examples/env/recipes/modify.rb +0 -13
  224. data/examples/env/spec/create_spec.rb +0 -26
  225. data/examples/env/spec/delete_spec.rb +0 -22
  226. data/examples/env/spec/modify_spec.rb +0 -22
  227. data/examples/erl_call/recipes/run.rb +0 -13
  228. data/examples/erl_call/spec/run_spec.rb +0 -23
  229. data/examples/execute/recipes/run.rb +0 -13
  230. data/examples/execute/spec/run_spec.rb +0 -23
  231. data/examples/expect_exception/recipes/compile_error.rb +0 -1
  232. data/examples/expect_exception/recipes/converge_error.rb +0 -5
  233. data/examples/expect_exception/recipes/no_error.rb +0 -1
  234. data/examples/expect_exception/spec/compile_error_spec.rb +0 -10
  235. data/examples/expect_exception/spec/converge_error_spec.rb +0 -10
  236. data/examples/expect_exception/spec/no_error_spec.rb +0 -10
  237. data/examples/file/recipes/create.rb +0 -15
  238. data/examples/file/recipes/create_if_missing.rb +0 -15
  239. data/examples/file/recipes/delete.rb +0 -15
  240. data/examples/file/recipes/touch.rb +0 -15
  241. data/examples/file/spec/create_if_missing_spec.rb +0 -28
  242. data/examples/file/spec/create_spec.rb +0 -32
  243. data/examples/file/spec/delete_spec.rb +0 -19
  244. data/examples/file/spec/touch_spec.rb +0 -19
  245. data/examples/freebsd_package/recipes/install.rb +0 -13
  246. data/examples/freebsd_package/recipes/remove.rb +0 -13
  247. data/examples/freebsd_package/spec/install_spec.rb +0 -26
  248. data/examples/freebsd_package/spec/remove_spec.rb +0 -22
  249. data/examples/gem_package/recipes/install.rb +0 -13
  250. data/examples/gem_package/recipes/purge.rb +0 -13
  251. data/examples/gem_package/recipes/reconfig.rb +0 -13
  252. data/examples/gem_package/recipes/remove.rb +0 -13
  253. data/examples/gem_package/recipes/upgrade.rb +0 -13
  254. data/examples/gem_package/spec/install_spec.rb +0 -23
  255. data/examples/gem_package/spec/purge_spec.rb +0 -19
  256. data/examples/gem_package/spec/reconfig_spec.rb +0 -19
  257. data/examples/gem_package/spec/remove_spec.rb +0 -19
  258. data/examples/gem_package/spec/upgrade_spec.rb +0 -19
  259. data/examples/git/recipes/checkout.rb +0 -13
  260. data/examples/git/recipes/export.rb +0 -13
  261. data/examples/git/recipes/sync.rb +0 -13
  262. data/examples/git/spec/checkout_spec.rb +0 -19
  263. data/examples/git/spec/export_spec.rb +0 -19
  264. data/examples/git/spec/sync_spec.rb +0 -23
  265. data/examples/group/recipes/create.rb +0 -13
  266. data/examples/group/recipes/manage.rb +0 -13
  267. data/examples/group/recipes/modify.rb +0 -13
  268. data/examples/group/recipes/remove.rb +0 -13
  269. data/examples/group/spec/create_spec.rb +0 -23
  270. data/examples/group/spec/manage_spec.rb +0 -19
  271. data/examples/group/spec/modify_spec.rb +0 -19
  272. data/examples/group/spec/remove_spec.rb +0 -18
  273. data/examples/guards/recipes/default.rb +0 -13
  274. data/examples/guards/spec/default_spec.rb +0 -17
  275. data/examples/heavy_provider_light_resource/libraries/resource_service.rb +0 -15
  276. data/examples/heavy_provider_light_resource/providers/service.rb +0 -9
  277. data/examples/heavy_provider_light_resource/recipes/default.rb +0 -3
  278. data/examples/heavy_provider_light_resource/spec/provider_service_spec.rb +0 -7
  279. data/examples/homebrew_package/recipes/install.rb +0 -13
  280. data/examples/homebrew_package/recipes/purge.rb +0 -13
  281. data/examples/homebrew_package/recipes/remove.rb +0 -13
  282. data/examples/homebrew_package/recipes/upgrade.rb +0 -13
  283. data/examples/homebrew_package/spec/install_spec.rb +0 -23
  284. data/examples/homebrew_package/spec/purge_spec.rb +0 -19
  285. data/examples/homebrew_package/spec/remove_spec.rb +0 -19
  286. data/examples/homebrew_package/spec/upgrade_spec.rb +0 -19
  287. data/examples/http_request/recipes/delete.rb +0 -13
  288. data/examples/http_request/recipes/get.rb +0 -13
  289. data/examples/http_request/recipes/head.rb +0 -13
  290. data/examples/http_request/recipes/options.rb +0 -13
  291. data/examples/http_request/recipes/post.rb +0 -13
  292. data/examples/http_request/recipes/put.rb +0 -13
  293. data/examples/http_request/spec/delete_spec.rb +0 -19
  294. data/examples/http_request/spec/get_spec.rb +0 -23
  295. data/examples/http_request/spec/head_spec.rb +0 -19
  296. data/examples/http_request/spec/options_spec.rb +0 -19
  297. data/examples/http_request/spec/post_spec.rb +0 -19
  298. data/examples/http_request/spec/put_spec.rb +0 -19
  299. data/examples/ifconfig/recipes/add.rb +0 -9
  300. data/examples/ifconfig/recipes/delete.rb +0 -8
  301. data/examples/ifconfig/recipes/disable.rb +0 -8
  302. data/examples/ifconfig/recipes/enable.rb +0 -8
  303. data/examples/ifconfig/spec/add_spec.rb +0 -19
  304. data/examples/ifconfig/spec/delete_spec.rb +0 -15
  305. data/examples/ifconfig/spec/disable_spec.rb +0 -15
  306. data/examples/ifconfig/spec/enable_spec.rb +0 -15
  307. data/examples/include_recipe/recipes/default.rb +0 -1
  308. data/examples/include_recipe/recipes/not.rb +0 -0
  309. data/examples/include_recipe/recipes/other.rb +0 -0
  310. data/examples/include_recipe/spec/default_spec.rb +0 -13
  311. data/examples/ips_package/recipes/install.rb +0 -13
  312. data/examples/ips_package/recipes/remove.rb +0 -13
  313. data/examples/ips_package/recipes/upgrade.rb +0 -13
  314. data/examples/ips_package/spec/install_spec.rb +0 -26
  315. data/examples/ips_package/spec/remove_spec.rb +0 -22
  316. data/examples/ips_package/spec/upgrade_spec.rb +0 -22
  317. data/examples/launchd/recipes/create.rb +0 -5
  318. data/examples/launchd/recipes/create_if_missing.rb +0 -3
  319. data/examples/launchd/recipes/delete.rb +0 -3
  320. data/examples/launchd/recipes/disable.rb +0 -3
  321. data/examples/launchd/recipes/enable.rb +0 -3
  322. data/examples/launchd/spec/create_if_missing_spec.rb +0 -10
  323. data/examples/launchd/spec/create_spec.rb +0 -14
  324. data/examples/launchd/spec/delete_spec.rb +0 -10
  325. data/examples/launchd/spec/disable_spec.rb +0 -10
  326. data/examples/launchd/spec/enable_spec.rb +0 -10
  327. data/examples/link/recipes/create.rb +0 -13
  328. data/examples/link/recipes/delete.rb +0 -13
  329. data/examples/link/recipes/link_to.rb +0 -3
  330. data/examples/link/spec/create_spec.rb +0 -23
  331. data/examples/link/spec/delete_spec.rb +0 -19
  332. data/examples/link/spec/link_to_spec.rb +0 -11
  333. data/examples/log/recipes/write.rb +0 -14
  334. data/examples/log/spec/write_spec.rb +0 -24
  335. data/examples/macports_package/recipes/install.rb +0 -13
  336. data/examples/macports_package/recipes/purge.rb +0 -13
  337. data/examples/macports_package/recipes/remove.rb +0 -13
  338. data/examples/macports_package/recipes/upgrade.rb +0 -13
  339. data/examples/macports_package/spec/install_spec.rb +0 -23
  340. data/examples/macports_package/spec/purge_spec.rb +0 -19
  341. data/examples/macports_package/spec/remove_spec.rb +0 -19
  342. data/examples/macports_package/spec/upgrade_spec.rb +0 -19
  343. data/examples/mdadm/recipes/assemble.rb +0 -13
  344. data/examples/mdadm/recipes/create.rb +0 -13
  345. data/examples/mdadm/recipes/stop.rb +0 -13
  346. data/examples/mdadm/spec/assemble_spec.rb +0 -19
  347. data/examples/mdadm/spec/create_spec.rb +0 -23
  348. data/examples/mdadm/spec/stop_spec.rb +0 -19
  349. data/examples/mount/recipes/disable.rb +0 -8
  350. data/examples/mount/recipes/enable.rb +0 -8
  351. data/examples/mount/recipes/mount.rb +0 -9
  352. data/examples/mount/recipes/remount.rb +0 -8
  353. data/examples/mount/recipes/umount.rb +0 -8
  354. data/examples/mount/spec/disable_spec.rb +0 -15
  355. data/examples/mount/spec/enable_spec.rb +0 -15
  356. data/examples/mount/spec/mount_spec.rb +0 -19
  357. data/examples/mount/spec/remount_spec.rb +0 -15
  358. data/examples/mount/spec/umount_spec.rb +0 -15
  359. data/examples/msu_package/recipes/install.rb +0 -13
  360. data/examples/msu_package/recipes/remove.rb +0 -13
  361. data/examples/msu_package/spec/install_spec.rb +0 -26
  362. data/examples/msu_package/spec/remove_spec.rb +0 -22
  363. data/examples/multiple_actions/recipes/default.rb +0 -3
  364. data/examples/multiple_actions/recipes/reversed.rb +0 -9
  365. data/examples/multiple_actions/recipes/sequential.rb +0 -9
  366. data/examples/multiple_actions/spec/default_spec.rb +0 -14
  367. data/examples/multiple_actions/spec/reversed_spec.rb +0 -17
  368. data/examples/multiple_actions/spec/sequential_spec.rb +0 -17
  369. data/examples/multiple_run_action/recipes/default.rb +0 -5
  370. data/examples/multiple_run_action/spec/default_spec.rb +0 -18
  371. data/examples/notifications/recipes/before.rb +0 -7
  372. data/examples/notifications/recipes/chained.rb +0 -12
  373. data/examples/notifications/recipes/default.rb +0 -7
  374. data/examples/notifications/recipes/delayed.rb +0 -7
  375. data/examples/notifications/recipes/immediately.rb +0 -7
  376. data/examples/notifications/spec/before_spec.rb +0 -16
  377. data/examples/notifications/spec/chained_spec.rb +0 -21
  378. data/examples/notifications/spec/default_spec.rb +0 -16
  379. data/examples/notifications/spec/delayed_spec.rb +0 -16
  380. data/examples/notifications/spec/immediately_spec.rb +0 -16
  381. data/examples/ohai/recipes/reload.rb +0 -13
  382. data/examples/ohai/spec/reload_spec.rb +0 -23
  383. data/examples/openbsd_package/recipes/install.rb +0 -13
  384. data/examples/openbsd_package/recipes/purge.rb +0 -13
  385. data/examples/openbsd_package/recipes/remove.rb +0 -13
  386. data/examples/openbsd_package/recipes/upgrade.rb +0 -13
  387. data/examples/openbsd_package/spec/install_spec.rb +0 -23
  388. data/examples/openbsd_package/spec/purge_spec.rb +0 -19
  389. data/examples/openbsd_package/spec/remove_spec.rb +0 -19
  390. data/examples/openbsd_package/spec/upgrade_spec.rb +0 -19
  391. data/examples/osx_profile/recipes/install.rb +0 -8
  392. data/examples/osx_profile/recipes/remove.rb +0 -8
  393. data/examples/osx_profile/spec/install_spec.rb +0 -15
  394. data/examples/osx_profile/spec/remove_spec.rb +0 -13
  395. data/examples/package/recipes/install.rb +0 -17
  396. data/examples/package/recipes/purge.rb +0 -17
  397. data/examples/package/recipes/reconfig.rb +0 -17
  398. data/examples/package/recipes/remove.rb +0 -17
  399. data/examples/package/recipes/upgrade.rb +0 -17
  400. data/examples/package/spec/install_spec.rb +0 -27
  401. data/examples/package/spec/purge_spec.rb +0 -23
  402. data/examples/package/spec/reconfig_spec.rb +0 -23
  403. data/examples/package/spec/remove_spec.rb +0 -23
  404. data/examples/package/spec/upgrade_spec.rb +0 -23
  405. data/examples/pacman_package/recipes/install.rb +0 -13
  406. data/examples/pacman_package/recipes/purge.rb +0 -13
  407. data/examples/pacman_package/recipes/remove.rb +0 -13
  408. data/examples/pacman_package/recipes/upgrade.rb +0 -13
  409. data/examples/pacman_package/spec/install_spec.rb +0 -26
  410. data/examples/pacman_package/spec/purge_spec.rb +0 -22
  411. data/examples/pacman_package/spec/remove_spec.rb +0 -22
  412. data/examples/pacman_package/spec/upgrade_spec.rb +0 -22
  413. data/examples/paludis_package/recipes/install.rb +0 -13
  414. data/examples/paludis_package/recipes/purge.rb +0 -13
  415. data/examples/paludis_package/recipes/remove.rb +0 -13
  416. data/examples/paludis_package/recipes/upgrade.rb +0 -13
  417. data/examples/paludis_package/spec/install_spec.rb +0 -23
  418. data/examples/paludis_package/spec/purge_spec.rb +0 -19
  419. data/examples/paludis_package/spec/remove_spec.rb +0 -19
  420. data/examples/paludis_package/spec/upgrade_spec.rb +0 -19
  421. data/examples/portage_package/recipes/install.rb +0 -13
  422. data/examples/portage_package/recipes/purge.rb +0 -13
  423. data/examples/portage_package/recipes/remove.rb +0 -13
  424. data/examples/portage_package/recipes/upgrade.rb +0 -13
  425. data/examples/portage_package/spec/install_spec.rb +0 -26
  426. data/examples/portage_package/spec/purge_spec.rb +0 -22
  427. data/examples/portage_package/spec/remove_spec.rb +0 -22
  428. data/examples/portage_package/spec/upgrade_spec.rb +0 -22
  429. data/examples/powershell_script/recipes/run.rb +0 -9
  430. data/examples/powershell_script/spec/run_spec.rb +0 -22
  431. data/examples/reboot/recipes/cancel.rb +0 -3
  432. data/examples/reboot/recipes/now.rb +0 -3
  433. data/examples/reboot/recipes/request.rb +0 -3
  434. data/examples/reboot/spec/cancel_spec.rb +0 -9
  435. data/examples/reboot/spec/now_spec.rb +0 -9
  436. data/examples/reboot/spec/request_spec.rb +0 -9
  437. data/examples/registry_key/recipes/create.rb +0 -13
  438. data/examples/registry_key/recipes/create_if_missing.rb +0 -13
  439. data/examples/registry_key/recipes/delete.rb +0 -13
  440. data/examples/registry_key/recipes/delete_key.rb +0 -13
  441. data/examples/registry_key/spec/create_if_missing_spec.rb +0 -22
  442. data/examples/registry_key/spec/create_spec.rb +0 -26
  443. data/examples/registry_key/spec/delete_key_spec.rb +0 -22
  444. data/examples/registry_key/spec/delete_spec.rb +0 -22
  445. data/examples/remote_directory/recipes/create.rb +0 -13
  446. data/examples/remote_directory/recipes/create_if_missing.rb +0 -13
  447. data/examples/remote_directory/recipes/delete.rb +0 -13
  448. data/examples/remote_directory/spec/create_if_missing_spec.rb +0 -19
  449. data/examples/remote_directory/spec/create_spec.rb +0 -23
  450. data/examples/remote_directory/spec/delete_spec.rb +0 -19
  451. data/examples/remote_file/recipes/create.rb +0 -18
  452. data/examples/remote_file/recipes/create_if_missing.rb +0 -16
  453. data/examples/remote_file/recipes/delete.rb +0 -16
  454. data/examples/remote_file/recipes/touch.rb +0 -16
  455. data/examples/remote_file/spec/create_if_missing_spec.rb +0 -19
  456. data/examples/remote_file/spec/create_spec.rb +0 -23
  457. data/examples/remote_file/spec/delete_spec.rb +0 -19
  458. data/examples/remote_file/spec/touch_spec.rb +0 -19
  459. data/examples/render_file/files/default/cookbook_file +0 -1
  460. data/examples/render_file/recipes/default.rb +0 -15
  461. data/examples/render_file/recipes/template_helpers.rb +0 -9
  462. data/examples/render_file/spec/default_spec.rb +0 -155
  463. data/examples/render_file/spec/template_helpers_spec.rb +0 -10
  464. data/examples/render_file/templates/default/_partial.erb +0 -1
  465. data/examples/render_file/templates/default/partial.erb +0 -1
  466. data/examples/render_file/templates/default/template.erb +0 -1
  467. data/examples/render_file/templates/default/template_with_helper.erb +0 -1
  468. data/examples/roles/recipes/another.rb +0 -3
  469. data/examples/roles/recipes/default.rb +0 -1
  470. data/examples/roles/roles/role.rb +0 -9
  471. data/examples/roles/spec/default_spec.rb +0 -21
  472. data/examples/route/recipes/add.rb +0 -13
  473. data/examples/route/recipes/delete.rb +0 -13
  474. data/examples/route/spec/add_spec.rb +0 -23
  475. data/examples/route/spec/delete_spec.rb +0 -19
  476. data/examples/rpm_package/recipes/install.rb +0 -13
  477. data/examples/rpm_package/recipes/remove.rb +0 -13
  478. data/examples/rpm_package/recipes/upgrade.rb +0 -13
  479. data/examples/rpm_package/spec/install_spec.rb +0 -26
  480. data/examples/rpm_package/spec/remove_spec.rb +0 -22
  481. data/examples/rpm_package/spec/upgrade_spec.rb +0 -22
  482. data/examples/ruby_block/recipes/create.rb +0 -8
  483. data/examples/ruby_block/recipes/run.rb +0 -9
  484. data/examples/ruby_block/spec/create_spec.rb +0 -13
  485. data/examples/ruby_block/spec/run_spec.rb +0 -18
  486. data/examples/script/recipes/run_bash.rb +0 -9
  487. data/examples/script/recipes/run_csh.rb +0 -9
  488. data/examples/script/recipes/run_ksh.rb +0 -9
  489. data/examples/script/recipes/run_perl.rb +0 -9
  490. data/examples/script/recipes/run_python.rb +0 -9
  491. data/examples/script/recipes/run_ruby.rb +0 -9
  492. data/examples/script/recipes/run_script.rb +0 -9
  493. data/examples/script/spec/run_bash_spec.rb +0 -19
  494. data/examples/script/spec/run_csh_spec.rb +0 -19
  495. data/examples/script/spec/run_ksh_spec.rb +0 -19
  496. data/examples/script/spec/run_perl_spec.rb +0 -19
  497. data/examples/script/spec/run_python_spec.rb +0 -19
  498. data/examples/script/spec/run_ruby_spec.rb +0 -19
  499. data/examples/script/spec/run_script_spec.rb +0 -19
  500. data/examples/server/recipes/client.rb +0 -6
  501. data/examples/server/recipes/data_bag.rb +0 -7
  502. data/examples/server/recipes/environment.rb +0 -6
  503. data/examples/server/recipes/node.rb +0 -6
  504. data/examples/server/recipes/render_with_cached.rb +0 -3
  505. data/examples/server/recipes/role.rb +0 -6
  506. data/examples/server/recipes/search.rb +0 -5
  507. data/examples/server/spec/client_spec.rb +0 -18
  508. data/examples/server/spec/data_bag_spec.rb +0 -25
  509. data/examples/server/spec/environment_spec.rb +0 -18
  510. data/examples/server/spec/exotic_port_spec.rb +0 -17
  511. data/examples/server/spec/node_spec.rb +0 -49
  512. data/examples/server/spec/render_with_cached_spec.rb +0 -15
  513. data/examples/server/spec/role_spec.rb +0 -18
  514. data/examples/server/spec/search_spec.rb +0 -61
  515. data/examples/service/recipes/disable.rb +0 -13
  516. data/examples/service/recipes/enable.rb +0 -13
  517. data/examples/service/recipes/reload.rb +0 -13
  518. data/examples/service/recipes/restart.rb +0 -13
  519. data/examples/service/recipes/start.rb +0 -13
  520. data/examples/service/recipes/stop.rb +0 -13
  521. data/examples/service/spec/disable_spec.rb +0 -19
  522. data/examples/service/spec/enable_spec.rb +0 -19
  523. data/examples/service/spec/reload_spec.rb +0 -19
  524. data/examples/service/spec/restart_spec.rb +0 -19
  525. data/examples/service/spec/start_spec.rb +0 -19
  526. data/examples/service/spec/stop_spec.rb +0 -19
  527. data/examples/smartos_package/recipes/install.rb +0 -13
  528. data/examples/smartos_package/recipes/remove.rb +0 -13
  529. data/examples/smartos_package/recipes/upgrade.rb +0 -13
  530. data/examples/smartos_package/spec/install_spec.rb +0 -26
  531. data/examples/smartos_package/spec/remove_spec.rb +0 -22
  532. data/examples/smartos_package/spec/upgrade_spec.rb +0 -22
  533. data/examples/solaris_package/recipes/install.rb +0 -13
  534. data/examples/solaris_package/recipes/remove.rb +0 -13
  535. data/examples/solaris_package/recipes/upgrade.rb +0 -13
  536. data/examples/solaris_package/spec/install_spec.rb +0 -26
  537. data/examples/solaris_package/spec/remove_spec.rb +0 -22
  538. data/examples/solaris_package/spec/upgrade_spec.rb +0 -22
  539. data/examples/state_attrs/providers/lwrp.rb +0 -2
  540. data/examples/state_attrs/recipes/default.rb +0 -3
  541. data/examples/state_attrs/resources/lwrp.rb +0 -6
  542. data/examples/state_attrs/spec/default_spec.rb +0 -12
  543. data/examples/step_into/providers/lwrp.rb +0 -3
  544. data/examples/step_into/providers/provides.rb +0 -3
  545. data/examples/step_into/recipes/default.rb +0 -3
  546. data/examples/step_into/resources/lwrp.rb +0 -4
  547. data/examples/step_into/resources/provides.rb +0 -6
  548. data/examples/step_into/spec/default_spec.rb +0 -30
  549. data/examples/stub_command/recipes/default.rb +0 -5
  550. data/examples/stub_command/recipes/other_recipe.rb +0 -3
  551. data/examples/stub_command/spec/default_spec.rb +0 -28
  552. data/examples/stub_data_bag/recipes/default.rb +0 -5
  553. data/examples/stub_data_bag/spec/default_spec.rb +0 -27
  554. data/examples/stub_data_bag_item/recipes/default.rb +0 -5
  555. data/examples/stub_data_bag_item/spec/default_spec.rb +0 -27
  556. data/examples/stub_node/recipes/default.rb +0 -0
  557. data/examples/stub_node/spec/default_spec.rb +0 -17
  558. data/examples/stub_search/recipes/block.rb +0 -3
  559. data/examples/stub_search/recipes/default.rb +0 -2
  560. data/examples/stub_search/spec/block_spec.rb +0 -27
  561. data/examples/stub_search/spec/default_spec.rb +0 -27
  562. data/examples/subscribes/recipes/before.rb +0 -5
  563. data/examples/subscribes/recipes/chained.rb +0 -10
  564. data/examples/subscribes/recipes/default.rb +0 -5
  565. data/examples/subscribes/recipes/delayed.rb +0 -5
  566. data/examples/subscribes/recipes/immediately.rb +0 -5
  567. data/examples/subscribes/spec/before_spec.rb +0 -16
  568. data/examples/subscribes/spec/chained_spec.rb +0 -21
  569. data/examples/subscribes/spec/default_spec.rb +0 -16
  570. data/examples/subscribes/spec/delayed_spec.rb +0 -16
  571. data/examples/subscribes/spec/immediately_spec.rb +0 -16
  572. data/examples/subversion/recipes/checkout.rb +0 -13
  573. data/examples/subversion/recipes/export.rb +0 -13
  574. data/examples/subversion/recipes/force_export.rb +0 -13
  575. data/examples/subversion/recipes/sync.rb +0 -13
  576. data/examples/subversion/spec/checkout_spec.rb +0 -19
  577. data/examples/subversion/spec/export_spec.rb +0 -19
  578. data/examples/subversion/spec/force_export_spec.rb +0 -19
  579. data/examples/subversion/spec/sync_spec.rb +0 -23
  580. data/examples/systemd_unit/recipes/create.rb +0 -3
  581. data/examples/systemd_unit/recipes/delete.rb +0 -3
  582. data/examples/systemd_unit/recipes/disable.rb +0 -3
  583. data/examples/systemd_unit/recipes/enable.rb +0 -3
  584. data/examples/systemd_unit/recipes/mask.rb +0 -3
  585. data/examples/systemd_unit/recipes/reload_or_restart.rb +0 -3
  586. data/examples/systemd_unit/recipes/reload_or_try_restart.rb +0 -3
  587. data/examples/systemd_unit/recipes/restart.rb +0 -3
  588. data/examples/systemd_unit/recipes/start.rb +0 -3
  589. data/examples/systemd_unit/recipes/stop.rb +0 -3
  590. data/examples/systemd_unit/recipes/try_restart.rb +0 -3
  591. data/examples/systemd_unit/recipes/unmask.rb +0 -3
  592. data/examples/systemd_unit/spec/create_spec.rb +0 -10
  593. data/examples/systemd_unit/spec/delete_spec.rb +0 -10
  594. data/examples/systemd_unit/spec/disable_spec.rb +0 -10
  595. data/examples/systemd_unit/spec/enable_spec.rb +0 -10
  596. data/examples/systemd_unit/spec/mask_spec.rb +0 -10
  597. data/examples/systemd_unit/spec/reload_or_restart_spec.rb +0 -10
  598. data/examples/systemd_unit/spec/reload_or_try_restart_spec.rb +0 -10
  599. data/examples/systemd_unit/spec/restart_spec.rb +0 -10
  600. data/examples/systemd_unit/spec/start_spec.rb +0 -10
  601. data/examples/systemd_unit/spec/stop_spec.rb +0 -10
  602. data/examples/systemd_unit/spec/try_restart_spec.rb +0 -10
  603. data/examples/systemd_unit/spec/unmask_spec.rb +0 -10
  604. data/examples/template/recipes/create.rb +0 -15
  605. data/examples/template/recipes/create_if_missing.rb +0 -15
  606. data/examples/template/recipes/delete.rb +0 -15
  607. data/examples/template/recipes/touch.rb +0 -15
  608. data/examples/template/spec/create_if_missing_spec.rb +0 -28
  609. data/examples/template/spec/create_spec.rb +0 -32
  610. data/examples/template/spec/delete_spec.rb +0 -19
  611. data/examples/template/spec/touch_spec.rb +0 -19
  612. data/examples/use_inline_resources/libraries/matchers.rb +0 -5
  613. data/examples/use_inline_resources/providers/lwrp.rb +0 -7
  614. data/examples/use_inline_resources/recipes/default.rb +0 -1
  615. data/examples/use_inline_resources/resources/lwrp.rb +0 -4
  616. data/examples/use_inline_resources/spec/default_spec.rb +0 -18
  617. data/examples/user/recipes/create.rb +0 -13
  618. data/examples/user/recipes/lock.rb +0 -13
  619. data/examples/user/recipes/manage.rb +0 -13
  620. data/examples/user/recipes/modify.rb +0 -13
  621. data/examples/user/recipes/remove.rb +0 -13
  622. data/examples/user/recipes/unlock.rb +0 -13
  623. data/examples/user/spec/create_spec.rb +0 -26
  624. data/examples/user/spec/lock_spec.rb +0 -22
  625. data/examples/user/spec/manage_spec.rb +0 -22
  626. data/examples/user/spec/modify_spec.rb +0 -22
  627. data/examples/user/spec/remove_spec.rb +0 -22
  628. data/examples/user/spec/unlock_spec.rb +0 -22
  629. data/examples/windows_package/recipes/install.rb +0 -13
  630. data/examples/windows_package/recipes/remove.rb +0 -13
  631. data/examples/windows_package/spec/install_spec.rb +0 -22
  632. data/examples/windows_package/spec/remove_spec.rb +0 -22
  633. data/examples/windows_service/recipes/configure_startup.rb +0 -13
  634. data/examples/windows_service/recipes/disable.rb +0 -13
  635. data/examples/windows_service/recipes/enable.rb +0 -13
  636. data/examples/windows_service/recipes/reload.rb +0 -13
  637. data/examples/windows_service/recipes/restart.rb +0 -13
  638. data/examples/windows_service/recipes/start.rb +0 -13
  639. data/examples/windows_service/recipes/stop.rb +0 -13
  640. data/examples/windows_service/spec/configure_startup_spec.rb +0 -22
  641. data/examples/windows_service/spec/disable_spec.rb +0 -22
  642. data/examples/windows_service/spec/enable_spec.rb +0 -22
  643. data/examples/windows_service/spec/reload_spec.rb +0 -22
  644. data/examples/windows_service/spec/restart_spec.rb +0 -22
  645. data/examples/windows_service/spec/start_spec.rb +0 -22
  646. data/examples/windows_service/spec/stop_spec.rb +0 -22
  647. data/examples/yum_package/recipes/install.rb +0 -13
  648. data/examples/yum_package/recipes/purge.rb +0 -13
  649. data/examples/yum_package/recipes/remove.rb +0 -13
  650. data/examples/yum_package/recipes/upgrade.rb +0 -13
  651. data/examples/yum_package/spec/install_spec.rb +0 -26
  652. data/examples/yum_package/spec/purge_spec.rb +0 -22
  653. data/examples/yum_package/spec/remove_spec.rb +0 -22
  654. data/examples/yum_package/spec/upgrade_spec.rb +0 -22
  655. data/examples/yum_repository/recipes/add.rb +0 -8
  656. data/examples/yum_repository/recipes/create.rb +0 -8
  657. data/examples/yum_repository/recipes/delete.rb +0 -3
  658. data/examples/yum_repository/recipes/makecache.rb +0 -3
  659. data/examples/yum_repository/recipes/remove.rb +0 -7
  660. data/examples/yum_repository/spec/add_spec.rb +0 -12
  661. data/examples/yum_repository/spec/create_spec.rb +0 -17
  662. data/examples/yum_repository/spec/delete_spec.rb +0 -12
  663. data/examples/yum_repository/spec/makecache_spec.rb +0 -12
  664. data/examples/yum_repository/spec/remove_spec.rb +0 -12
  665. data/examples/zypper_package/recipes/install.rb +0 -13
  666. data/examples/zypper_package/recipes/purge.rb +0 -13
  667. data/examples/zypper_package/recipes/remove.rb +0 -13
  668. data/examples/zypper_package/recipes/upgrade.rb +0 -13
  669. data/examples/zypper_package/spec/install_spec.rb +0 -23
  670. data/examples/zypper_package/spec/purge_spec.rb +0 -19
  671. data/examples/zypper_package/spec/remove_spec.rb +0 -19
  672. data/examples/zypper_package/spec/upgrade_spec.rb +0 -19
  673. data/features/apt_package.feature +0 -14
  674. data/features/apt_repository.feature +0 -15
  675. data/features/apt_update.feature +0 -13
  676. data/features/attributes.feature +0 -7
  677. data/features/batch.feature +0 -10
  678. data/features/bff_package.feature +0 -12
  679. data/features/cab_package.feature +0 -21
  680. data/features/cached.feature +0 -7
  681. data/features/chef_gem.feature +0 -14
  682. data/features/chocolatey_package.feature +0 -14
  683. data/features/compile_time.feature +0 -7
  684. data/features/cookbook_file.feature +0 -13
  685. data/features/cron.feature +0 -11
  686. data/features/custom_matcher.feature +0 -11
  687. data/features/custom_resource.feature +0 -7
  688. data/features/deploy.feature +0 -12
  689. data/features/directory.feature +0 -11
  690. data/features/dnf_package.feature +0 -26
  691. data/features/do_nothing.feature +0 -10
  692. data/features/dpkg_package.feature +0 -12
  693. data/features/dsc_resource.feature +0 -10
  694. data/features/dsc_script.feature +0 -10
  695. data/features/env.feature +0 -12
  696. data/features/erl_call.feature +0 -10
  697. data/features/execute.feature +0 -10
  698. data/features/exotic_zero_port.feature +0 -7
  699. data/features/expect_exception.feature +0 -12
  700. data/features/file.feature +0 -13
  701. data/features/freebsd_package.feature +0 -11
  702. data/features/gem_package.feature +0 -14
  703. data/features/git.feature +0 -12
  704. data/features/group.feature +0 -13
  705. data/features/guards.feature +0 -10
  706. data/features/heavy_provider_light_resource.feature +0 -10
  707. data/features/homebrew_package.feature +0 -12
  708. data/features/http_request.feature +0 -15
  709. data/features/ifconfig.feature +0 -13
  710. data/features/include_recipe.feature +0 -10
  711. data/features/ips_package.feature +0 -12
  712. data/features/launchd.feature +0 -17
  713. data/features/link.feature +0 -12
  714. data/features/log.feature +0 -10
  715. data/features/macports_package.feature +0 -13
  716. data/features/mdadm.feature +0 -12
  717. data/features/mount.feature +0 -14
  718. data/features/msu_package.feature +0 -23
  719. data/features/multiple_actions.feature +0 -12
  720. data/features/multiple_run_action.feature +0 -7
  721. data/features/notifications.feature +0 -14
  722. data/features/ohai.feature +0 -10
  723. data/features/openbsd_package.feature +0 -12
  724. data/features/osx_profile.feature +0 -13
  725. data/features/package.feature +0 -14
  726. data/features/pacman_package.feature +0 -13
  727. data/features/paludis_package.feature +0 -12
  728. data/features/portage_package.feature +0 -13
  729. data/features/powershell_script.feature +0 -10
  730. data/features/reboot.feature +0 -12
  731. data/features/registry_key.feature +0 -13
  732. data/features/remote_directory.feature +0 -12
  733. data/features/remote_file.feature +0 -13
  734. data/features/render_file.feature +0 -11
  735. data/features/roles.feature +0 -7
  736. data/features/route.feature +0 -11
  737. data/features/rpm_package.feature +0 -12
  738. data/features/ruby_block.feature +0 -11
  739. data/features/script.feature +0 -16
  740. data/features/server.feature +0 -16
  741. data/features/server_on_disk.feature +0 -16
  742. data/features/service.feature +0 -15
  743. data/features/smartos_package.feature +0 -12
  744. data/features/solaris_package.feature +0 -12
  745. data/features/state_attrs.feature +0 -7
  746. data/features/step_definitions/background_steps.rb +0 -7
  747. data/features/step_into.feature +0 -7
  748. data/features/stub_command.feature +0 -7
  749. data/features/stub_data_bag.feature +0 -7
  750. data/features/stub_data_bag_item.feature +0 -7
  751. data/features/stub_node.feature +0 -7
  752. data/features/stub_search.feature +0 -7
  753. data/features/subscribes.feature +0 -14
  754. data/features/subversion.feature +0 -13
  755. data/features/support/env.rb +0 -38
  756. data/features/support/executor.rb +0 -20
  757. data/features/support/exotic_zero_port.rb +0 -3
  758. data/features/support/on_disk.rb +0 -7
  759. data/features/systemd_unit.feature +0 -27
  760. data/features/template.feature +0 -13
  761. data/features/use_inline_resources.feature +0 -7
  762. data/features/user.feature +0 -15
  763. data/features/windows_package.feature +0 -11
  764. data/features/windows_service.feature +0 -16
  765. data/features/yum_package.feature +0 -13
  766. data/features/yum_repository.feature +0 -23
  767. data/features/zypper_package.feature +0 -13
  768. data/lib/chefspec/api/apt_package.rb +0 -192
  769. data/lib/chefspec/api/apt_repository.rb +0 -56
  770. data/lib/chefspec/api/apt_update.rb +0 -53
  771. data/lib/chefspec/api/batch.rb +0 -43
  772. data/lib/chefspec/api/bff_package.rb +0 -154
  773. data/lib/chefspec/api/cab_package.rb +0 -80
  774. data/lib/chefspec/api/chef_gem.rb +0 -191
  775. data/lib/chefspec/api/chocolatey_package.rb +0 -107
  776. data/lib/chefspec/api/cookbook_file.rb +0 -166
  777. data/lib/chefspec/api/cron.rb +0 -80
  778. data/lib/chefspec/api/deploy.rb +0 -117
  779. data/lib/chefspec/api/directory.rb +0 -80
  780. data/lib/chefspec/api/dnf_package.rb +0 -154
  781. data/lib/chefspec/api/dpkg_package.rb +0 -117
  782. data/lib/chefspec/api/dsc_resource.rb +0 -49
  783. data/lib/chefspec/api/dsc_script.rb +0 -37
  784. data/lib/chefspec/api/easy_install_package.rb +0 -154
  785. data/lib/chefspec/api/env.rb +0 -117
  786. data/lib/chefspec/api/erl_call.rb +0 -43
  787. data/lib/chefspec/api/execute.rb +0 -43
  788. data/lib/chefspec/api/file.rb +0 -166
  789. data/lib/chefspec/api/freebsd_package.rb +0 -80
  790. data/lib/chefspec/api/gem_package.rb +0 -191
  791. data/lib/chefspec/api/git.rb +0 -117
  792. data/lib/chefspec/api/group.rb +0 -154
  793. data/lib/chefspec/api/homebrew_package.rb +0 -154
  794. data/lib/chefspec/api/http_request.rb +0 -228
  795. data/lib/chefspec/api/ifconfig.rb +0 -154
  796. data/lib/chefspec/api/ips_package.rb +0 -117
  797. data/lib/chefspec/api/launchd.rb +0 -151
  798. data/lib/chefspec/api/log.rb +0 -43
  799. data/lib/chefspec/api/macports_package.rb +0 -154
  800. data/lib/chefspec/api/mdadm.rb +0 -117
  801. data/lib/chefspec/api/mount.rb +0 -192
  802. data/lib/chefspec/api/msu_package.rb +0 -81
  803. data/lib/chefspec/api/ohai.rb +0 -43
  804. data/lib/chefspec/api/openbsd_package.rb +0 -155
  805. data/lib/chefspec/api/osx_profile.rb +0 -63
  806. data/lib/chefspec/api/package.rb +0 -192
  807. data/lib/chefspec/api/pacman_package.rb +0 -155
  808. data/lib/chefspec/api/paludis_package.rb +0 -155
  809. data/lib/chefspec/api/portage_package.rb +0 -155
  810. data/lib/chefspec/api/powershell_script.rb +0 -43
  811. data/lib/chefspec/api/registry_key.rb +0 -166
  812. data/lib/chefspec/api/remote_directory.rb +0 -120
  813. data/lib/chefspec/api/remote_file.rb +0 -166
  814. data/lib/chefspec/api/route.rb +0 -80
  815. data/lib/chefspec/api/rpm_package.rb +0 -117
  816. data/lib/chefspec/api/ruby_block.rb +0 -68
  817. data/lib/chefspec/api/script.rb +0 -278
  818. data/lib/chefspec/api/service.rb +0 -246
  819. data/lib/chefspec/api/smartos_package.rb +0 -117
  820. data/lib/chefspec/api/solaris_package.rb +0 -117
  821. data/lib/chefspec/api/subversion.rb +0 -154
  822. data/lib/chefspec/api/systemd_unit.rb +0 -353
  823. data/lib/chefspec/api/template.rb +0 -166
  824. data/lib/chefspec/api/windows_package.rb +0 -86
  825. data/lib/chefspec/api/windows_service.rb +0 -286
  826. data/lib/chefspec/api/yum_package.rb +0 -154
  827. data/lib/chefspec/api/yum_repository.rb +0 -130
  828. data/lib/chefspec/api/zypper_package.rb +0 -154
  829. data/lib/chefspec/macros.rb +0 -222
  830. data/spec/unit/api_spec.rb +0 -18
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe ChefSpec::SoloRunner do
4
4
  before do
@@ -7,7 +7,7 @@ describe ChefSpec::SoloRunner do
7
7
  .and_return(true)
8
8
  end
9
9
 
10
- describe '#initialize' do
10
+ describe "#initialize" do
11
11
  let(:windows_caller_stack) do
12
12
  [
13
13
  "C:/cookbooks/Temp/spec/test_spec.rb:11:in `block (2 levels) in <top (required)>'",
@@ -29,25 +29,25 @@ describe ChefSpec::SoloRunner do
29
29
  ]
30
30
  end
31
31
 
32
- it 'defaults the log level to :warn' do
32
+ it "defaults the log level to :warn" do
33
33
  described_class.new
34
34
  expect(Chef::Log.level).to eq(:warn)
35
35
  end
36
36
 
37
- it 'sets the log level' do
37
+ it "sets the log level" do
38
38
  described_class.new(log_level: :error)
39
39
  expect(Chef::Log.level).to eq(:error)
40
40
  end
41
41
 
42
- it 'defaults the cookbook_path to the calling spec' do
42
+ it "defaults the cookbook_path to the calling spec" do
43
43
  described_class.new
44
- expect(Chef::Config.cookbook_path).to eq([File.expand_path('../../../..', __FILE__)])
44
+ expect(Chef::Config.cookbook_path).to eq([File.expand_path("../../..", __dir__)])
45
45
  end
46
46
 
47
- it 'defaults the cookbook_path to the calling spec when using windows paths' do
47
+ it "defaults the cookbook_path to the calling spec when using windows paths" do
48
48
  runner = described_class.new
49
49
  windows_path = runner.instance_exec(windows_caller_stack) { |callstack|
50
- calling_cookbook_path(callstack)
50
+ calling_cookbook_path({}, callstack)
51
51
  }
52
52
  # There's got to be a better way to do this the File.expand_path returns
53
53
  # something like /home/user/repos/chefspec/C:/cookbooks" which is less
@@ -55,117 +55,117 @@ describe ChefSpec::SoloRunner do
55
55
  expect(windows_path).to end_with("C:/cookbooks")
56
56
  end
57
57
 
58
- it 'sets the cookbook path' do
59
- described_class.new(cookbook_path: '/tmp/bacon')
60
- expect(Chef::Config.cookbook_path).to eq(['/tmp/bacon'])
58
+ it "sets the cookbook path" do
59
+ described_class.new(cookbook_path: "/tmp/bacon")
60
+ expect(Chef::Config.cookbook_path).to eq(["/tmp/bacon"])
61
61
  end
62
62
 
63
- it 'sets the file cache path' do
64
- described_class.new( file_cache_path: '/tmp/pantoa')
65
- expect(Chef::Config.file_cache_path).to eq('/tmp/pantoa')
63
+ it "sets the file cache path" do
64
+ described_class.new( file_cache_path: "/tmp/pantoa")
65
+ expect(Chef::Config.file_cache_path).to eq("/tmp/pantoa")
66
66
  end
67
67
 
68
- it 'sets the Chef::Config' do
69
- expect(Chef::Config.cache_type).to eq('Memory')
68
+ it "sets the Chef::Config" do
69
+ expect(Chef::Config.cache_type).to eq("Memory")
70
70
  expect(Chef::Config.force_logger).to be_truthy
71
71
  expect(Chef::Config.no_lazy_load).to be_truthy
72
72
  expect(Chef::Config.solo).to be_truthy
73
73
  expect(Chef::Config.use_policyfile).to be_falsey
74
74
  end
75
75
 
76
- it 'yields a block to set node attributes' do
76
+ it "yields a block to set node attributes" do
77
77
  expect { |block| described_class.new({}, &block) }.to yield_with_args(Chef::Node)
78
78
  end
79
79
 
80
- context 'default ohai attributes' do
80
+ context "default ohai attributes" do
81
81
  let(:hash) { described_class.new.node.to_hash }
82
82
 
83
- it 'sets the default attributes' do
84
- expect(hash['os']).to eq('chefspec')
85
- expect(hash['languages']['ruby']['bin_dir']).to eq('/usr/local/bin')
86
- expect(hash['os_version']).to eq('0.6.1')
87
- expect(hash['fqdn']).to eq('chefspec.local')
88
- expect(hash['domain']).to eq('local')
89
- expect(hash['ipaddress']).to eq('127.0.0.1')
90
- expect(hash['hostname']).to eq('chefspec')
91
- expect(hash['kernel']['machine']).to eq('i386')
83
+ it "sets the default attributes" do
84
+ expect(hash["os"]).to eq("chefspec")
85
+ expect(hash["languages"]["ruby"]["bin_dir"]).to eq("/usr/local/bin")
86
+ expect(hash["os_version"]).to eq("0.6.1")
87
+ expect(hash["fqdn"]).to eq("chefspec.local")
88
+ expect(hash["domain"]).to eq("local")
89
+ expect(hash["ipaddress"]).to eq("127.0.0.1")
90
+ expect(hash["hostname"]).to eq("chefspec")
91
+ expect(hash["kernel"]["machine"]).to eq("i386")
92
92
  end
93
93
  end
94
94
 
95
- context 'fauxhai attributes' do
96
- let(:hash) { described_class.new(platform: 'ubuntu', version: '16.04').node.to_hash }
95
+ context "fauxhai attributes" do
96
+ let(:hash) { described_class.new(platform: "ubuntu", version: "18.04").node.to_hash }
97
97
 
98
- it 'sets the attributes from fauxhai' do
99
- expect(hash['os']).to eq('linux')
100
- expect(hash['languages']['ruby']['ruby_bin']).to eq('/usr/local/bin/ruby')
101
- expect(hash['os_version']).to match(/4.4.0-.*-generic/) # avoid failing when fauxhai data changes
102
- expect(hash['fqdn']).to eq('fauxhai.local')
103
- expect(hash['domain']).to eq('local')
104
- expect(hash['ipaddress']).to eq('10.0.0.2')
105
- expect(hash['hostname']).to eq('Fauxhai')
106
- expect(hash['kernel']['machine']).to eq('x86_64')
98
+ it "sets the attributes from fauxhai" do
99
+ expect(hash["os"]).to eq("linux")
100
+ expect(hash["languages"]["ruby"]["ruby_bin"]).to eq("/usr/local/bin/ruby")
101
+ expect(hash["os_version"]).to match(/5.4.0-.*-.*/) # avoid failing when fauxhai data changes
102
+ expect(hash["fqdn"]).to eq("fauxhai.local")
103
+ expect(hash["domain"]).to eq("local")
104
+ expect(hash["ipaddress"]).to eq("10.0.0.2")
105
+ expect(hash["hostname"]).to eq("Fauxhai")
106
+ expect(hash["kernel"]["machine"]).to eq("x86_64")
107
107
  end
108
108
  end
109
109
 
110
- context 'RSpec global configuration' do
110
+ context "RSpec global configuration" do
111
111
  before do
112
- allow(RSpec.configuration).to receive(:cookbook_path).and_return('./path')
113
- allow(RSpec.configuration).to receive(:environment_path).and_return('./env-path')
114
- allow(RSpec.configuration).to receive(:file_cache_path).and_return('./file-cache-path')
112
+ allow(RSpec.configuration).to receive(:cookbook_path).and_return("./path")
113
+ allow(RSpec.configuration).to receive(:environment_path).and_return("./env-path")
114
+ allow(RSpec.configuration).to receive(:file_cache_path).and_return("./file-cache-path")
115
115
  allow(RSpec.configuration).to receive(:log_level).and_return(:fatal)
116
- allow(RSpec.configuration).to receive(:path).and_return('ohai.json')
117
- allow(RSpec.configuration).to receive(:platform).and_return('ubuntu')
118
- allow(RSpec.configuration).to receive(:version).and_return('12.04')
116
+ allow(RSpec.configuration).to receive(:path).and_return("ohai.json")
117
+ allow(RSpec.configuration).to receive(:platform).and_return("ubuntu")
118
+ allow(RSpec.configuration).to receive(:version).and_return("12.04")
119
119
  end
120
120
 
121
- it 'uses the RSpec values' do
121
+ it "uses the RSpec values" do
122
122
  options = described_class.new.options
123
- expect(options[:cookbook_path]).to eq('./path')
124
- expect(options[:environment_path]).to eq('./env-path')
125
- expect(options[:file_cache_path]).to eq('./file-cache-path')
123
+ expect(options[:cookbook_path]).to eq("./path")
124
+ expect(options[:environment_path]).to eq("./env-path")
125
+ expect(options[:file_cache_path]).to eq("./file-cache-path")
126
126
  expect(options[:log_level]).to eq(:fatal)
127
- expect(options[:path]).to eq('ohai.json')
128
- expect(options[:platform]).to eq('ubuntu')
129
- expect(options[:version]).to eq('12.04')
127
+ expect(options[:path]).to eq("ohai.json")
128
+ expect(options[:platform]).to eq("ubuntu")
129
+ expect(options[:version]).to eq("12.04")
130
130
  end
131
131
  end
132
132
  end
133
133
 
134
- describe '#node' do
135
- it 'returns the Chef::Node' do
134
+ describe "#node" do
135
+ it "returns the Chef::Node" do
136
136
  expect(subject.node).to be_a(Chef::Node)
137
137
  end
138
138
 
139
- it 'defines a #runner method that returns self' do
139
+ it "defines a #runner method that returns self" do
140
140
  expect(subject.node.methods).to include(:runner)
141
141
  expect(subject.node.runner).to be(subject)
142
142
  end
143
143
 
144
- it 'allows attributes to be set on the node' do
145
- subject.node.normal['bacon'] = 'ham'
146
- expect(subject.node.bacon).to eq('ham')
144
+ it "allows attributes to be set on the node" do
145
+ subject.node.normal["bacon"] = "ham"
146
+ expect(subject.node.bacon).to eq("ham")
147
147
  end
148
148
  end
149
149
 
150
- describe '#to_s' do
151
- it 'overrides the default string representation to something readable' do
152
- expect(subject.converge('apache2::default').to_s)
153
- .to eq('#<ChefSpec::SoloRunner run_list: [recipe[apache2::default]]>')
150
+ describe "#to_s" do
151
+ it "overrides the default string representation to something readable" do
152
+ expect(subject.converge("apache2::default").to_s)
153
+ .to eq("#<ChefSpec::SoloRunner run_list: [recipe[apache2::default]]>")
154
154
  end
155
155
 
156
- it 'is ok when a convergence has not yet taken place' do
157
- expect(subject.to_s).to eq('#<ChefSpec::SoloRunner run_list: []>')
156
+ it "is ok when a convergence has not yet taken place" do
157
+ expect(subject.to_s).to eq("#<ChefSpec::SoloRunner run_list: []>")
158
158
  end
159
159
 
160
- it 'includes the entire run_list' do
161
- expect(subject.converge('apache2::default', 'apache2::mod_ssl').to_s)
162
- .to eq('#<ChefSpec::SoloRunner run_list: [recipe[apache2::default], recipe[apache2::mod_ssl]]>')
160
+ it "includes the entire run_list" do
161
+ expect(subject.converge("apache2::default", "apache2::mod_ssl").to_s)
162
+ .to eq("#<ChefSpec::SoloRunner run_list: [recipe[apache2::default], recipe[apache2::mod_ssl]]>")
163
163
  end
164
164
 
165
- it 'has the run_list only for the last convergence' do
166
- ['mysql::client', 'mysql::server'].each { |recipe| subject.converge(recipe) }
165
+ it "has the run_list only for the last convergence" do
166
+ ["mysql::client", "mysql::server"].each { |recipe| subject.converge(recipe) }
167
167
  expect(subject.to_s)
168
- .to eq('#<ChefSpec::SoloRunner run_list: [recipe[mysql::server]]>')
168
+ .to eq("#<ChefSpec::SoloRunner run_list: [recipe[mysql::server]]>")
169
169
  end
170
170
  end
171
171
  end
@@ -1,27 +1,27 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe ChefSpec::Stubs::CommandRegistry do
4
4
  before { described_class.reset! }
5
5
 
6
- it 'inherits from Registry' do
6
+ it "inherits from Registry" do
7
7
  expect(described_class.superclass).to be(ChefSpec::Stubs::Registry)
8
8
  end
9
9
 
10
- describe '#stub_for' do
11
- it 'finds a stub by name' do
12
- command = double('command', command: 'test -f /var/www')
10
+ describe "#stub_for" do
11
+ it "finds a stub by name" do
12
+ command = double("command", command: "test -f /var/www")
13
13
  described_class.register(command)
14
- expect(described_class.stub_for('test -f /var/www')).to eq(command)
14
+ expect(described_class.stub_for("test -f /var/www")).to eq(command)
15
15
  end
16
16
 
17
- it 'finds a stub by regex' do
18
- command = double('command', command: /test -f (.+)/)
17
+ it "finds a stub by regex" do
18
+ command = double("command", command: /test -f (.+)/)
19
19
  described_class.register(command)
20
- expect(described_class.stub_for('test -f /var/www')).to eq(command)
20
+ expect(described_class.stub_for("test -f /var/www")).to eq(command)
21
21
  end
22
22
 
23
- it 'returns nil when no commands are matched' do
24
- expect(described_class.stub_for('which a2ensite')).to eq(nil)
23
+ it "returns nil when no commands are matched" do
24
+ expect(described_class.stub_for("which a2ensite")).to eq(nil)
25
25
  end
26
26
  end
27
27
  end
@@ -1,59 +1,59 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe ChefSpec::Stubs::CommandStub do
4
- describe '#initialize' do
5
- it 'sets the command and block' do
4
+ describe "#initialize" do
5
+ it "sets the command and block" do
6
6
  block = Proc.new {}
7
- stub = described_class.new('command', &block)
7
+ stub = described_class.new("command", &block)
8
8
 
9
- expect(stub.command).to eq('command')
9
+ expect(stub.command).to eq("command")
10
10
  expect(stub.block).to eq(block)
11
11
  end
12
12
  end
13
13
 
14
- describe '#and_return' do
15
- subject { described_class.new('command').and_return('value') }
14
+ describe "#and_return" do
15
+ subject { described_class.new("command").and_return("value") }
16
16
 
17
- it 'sets the value' do
18
- expect(subject.value).to eq('value')
17
+ it "sets the value" do
18
+ expect(subject.value).to eq("value")
19
19
  end
20
20
 
21
- it 'returns an instance of the stub' do
22
- expect(subject.and_return('value')).to be(subject)
21
+ it "returns an instance of the stub" do
22
+ expect(subject.and_return("value")).to be(subject)
23
23
  end
24
24
  end
25
25
 
26
- describe '#result' do
27
- context 'when a value is given' do
28
- subject { described_class.new('command').and_return('value') }
26
+ describe "#result" do
27
+ context "when a value is given" do
28
+ subject { described_class.new("command").and_return("value") }
29
29
 
30
- it 'returns the value' do
31
- expect(subject.result).to eq('value')
30
+ it "returns the value" do
31
+ expect(subject.result).to eq("value")
32
32
  end
33
33
  end
34
34
 
35
- context 'when a block is given' do
36
- subject { described_class.new('command') { 1 == 2 } }
35
+ context "when a block is given" do
36
+ subject { described_class.new("command") { 1 == 2 } }
37
37
 
38
- it 'calls the block' do
38
+ it "calls the block" do
39
39
  expect(subject.result).to eq(false)
40
40
  end
41
41
  end
42
42
  end
43
43
 
44
- describe '#signature' do
45
- context 'when a value is given' do
46
- subject { described_class.new('command').and_return(false) }
44
+ describe "#signature" do
45
+ context "when a value is given" do
46
+ subject { described_class.new("command").and_return(false) }
47
47
 
48
- it 'includes the value' do
48
+ it "includes the value" do
49
49
  expect(subject.signature).to eq('stub_command("command").and_return(false)')
50
50
  end
51
51
  end
52
52
 
53
- context 'when a block is given' do
54
- subject { described_class.new('command') { 1 == 2 } }
53
+ context "when a block is given" do
54
+ subject { described_class.new("command") { 1 == 2 } }
55
55
 
56
- it 'includes a comment about the block' do
56
+ it "includes a comment about the block" do
57
57
  expect(subject.signature).to eq('stub_command("command") { # Ruby code }')
58
58
  end
59
59
  end
@@ -1,39 +1,39 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe ChefSpec::Stubs::DataBagItemRegistry do
4
4
  before { described_class.reset! }
5
5
 
6
- it 'inherits from Registry' do
6
+ it "inherits from Registry" do
7
7
  expect(described_class.superclass).to be(ChefSpec::Stubs::Registry)
8
8
  end
9
9
 
10
- describe '#stub_for' do
11
- it 'finds a stub by name' do
12
- search = double('search', bag: 'users', id: 'svargo')
10
+ describe "#stub_for" do
11
+ it "finds a stub by name" do
12
+ search = double("search", bag: "users", id: "svargo")
13
13
  described_class.register(search)
14
- expect(described_class.stub_for('users', 'svargo')).to eq(search)
14
+ expect(described_class.stub_for("users", "svargo")).to eq(search)
15
15
  end
16
16
 
17
- it 'finds a stub by Regex' do
18
- search = double('search', bag: 'users', id: /sv(.+)/)
17
+ it "finds a stub by Regex" do
18
+ search = double("search", bag: "users", id: /sv(.+)/)
19
19
  described_class.register(search)
20
- expect(described_class.stub_for('users', 'svargo')).to eq(search)
20
+ expect(described_class.stub_for("users", "svargo")).to eq(search)
21
21
  end
22
22
 
23
- it 'matches when the bag is a Symbol' do
24
- search = double('search', bag: :users, id: 'svargo')
23
+ it "matches when the bag is a Symbol" do
24
+ search = double("search", bag: :users, id: "svargo")
25
25
  described_class.register(search)
26
- expect(described_class.stub_for('users', 'svargo')).to eq(search)
26
+ expect(described_class.stub_for("users", "svargo")).to eq(search)
27
27
  end
28
28
 
29
- it 'matches when the stub is a Symbol' do
30
- search = double('search', bag: 'users', id: 'svargo')
29
+ it "matches when the stub is a Symbol" do
30
+ search = double("search", bag: "users", id: "svargo")
31
31
  described_class.register(search)
32
- expect(described_class.stub_for(:users, 'svargo')).to eq(search)
32
+ expect(described_class.stub_for(:users, "svargo")).to eq(search)
33
33
  end
34
34
 
35
- it 'returns nil when no searches are matched' do
36
- expect(described_class.stub_for('users', 'svargo')).to eq(nil)
35
+ it "returns nil when no searches are matched" do
36
+ expect(described_class.stub_for("users", "svargo")).to eq(nil)
37
37
  end
38
38
  end
39
39
  end
@@ -1,34 +1,34 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe ChefSpec::Stubs::DataBagItemStub do
4
- it 'inherts from Stub' do
4
+ it "inherts from Stub" do
5
5
  expect(described_class.superclass).to be(ChefSpec::Stubs::Stub)
6
6
  end
7
7
 
8
- describe '#initialize' do
9
- it 'sets the bag, id, and block' do
8
+ describe "#initialize" do
9
+ it "sets the bag, id, and block" do
10
10
  block = Proc.new {}
11
- stub = described_class.new('bag', 'id', &block)
11
+ stub = described_class.new("bag", "id", &block)
12
12
 
13
- expect(stub.bag).to eq('bag')
14
- expect(stub.id).to eq('id')
13
+ expect(stub.bag).to eq("bag")
14
+ expect(stub.id).to eq("id")
15
15
  expect(stub.block).to eq(block)
16
16
  end
17
17
  end
18
18
 
19
- describe '#signature' do
20
- context 'when a value is given' do
21
- subject { described_class.new('bag', 'id').and_return(false) }
19
+ describe "#signature" do
20
+ context "when a value is given" do
21
+ subject { described_class.new("bag", "id").and_return(false) }
22
22
 
23
- it 'includes the value' do
23
+ it "includes the value" do
24
24
  expect(subject.signature).to eq('stub_data_bag_item("bag", "id").and_return(false)')
25
25
  end
26
26
  end
27
27
 
28
- context 'when a block is given' do
29
- subject { described_class.new('bag', 'id') { 1 == 2 } }
28
+ context "when a block is given" do
29
+ subject { described_class.new("bag", "id") { 1 == 2 } }
30
30
 
31
- it 'includes a comment about the block' do
31
+ it "includes a comment about the block" do
32
32
  expect(subject.signature).to eq('stub_data_bag_item("bag", "id") { # Ruby code }')
33
33
  end
34
34
  end
@@ -1,39 +1,39 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe ChefSpec::Stubs::DataBagRegistry do
4
4
  before { described_class.reset! }
5
5
 
6
- it 'inherits from Registry' do
6
+ it "inherits from Registry" do
7
7
  expect(described_class.superclass).to be(ChefSpec::Stubs::Registry)
8
8
  end
9
9
 
10
- describe '#stub_for' do
11
- it 'finds a stub by name' do
12
- search = double('search', bag: 'users')
10
+ describe "#stub_for" do
11
+ it "finds a stub by name" do
12
+ search = double("search", bag: "users")
13
13
  described_class.register(search)
14
- expect(described_class.stub_for('users')).to eq(search)
14
+ expect(described_class.stub_for("users")).to eq(search)
15
15
  end
16
16
 
17
- it 'finds a stub by Regex' do
18
- search = double('search', bag: 'users')
17
+ it "finds a stub by Regex" do
18
+ search = double("search", bag: "users")
19
19
  described_class.register(search)
20
- expect(described_class.stub_for('users')).to eq(search)
20
+ expect(described_class.stub_for("users")).to eq(search)
21
21
  end
22
22
 
23
- it 'matches when the bag is Symbol' do
24
- search = double('search', bag: :users)
23
+ it "matches when the bag is Symbol" do
24
+ search = double("search", bag: :users)
25
25
  described_class.register(search)
26
- expect(described_class.stub_for('users')).to eq(search)
26
+ expect(described_class.stub_for("users")).to eq(search)
27
27
  end
28
28
 
29
- it 'matches when the stub is Symbol' do
30
- search = double('search', bag: 'users')
29
+ it "matches when the stub is Symbol" do
30
+ search = double("search", bag: "users")
31
31
  described_class.register(search)
32
32
  expect(described_class.stub_for(:users)).to eq(search)
33
33
  end
34
34
 
35
- it 'returns nil when no searches are matched' do
36
- expect(described_class.stub_for('users')).to eq(nil)
35
+ it "returns nil when no searches are matched" do
36
+ expect(described_class.stub_for("users")).to eq(nil)
37
37
  end
38
38
  end
39
39
  end
@@ -1,33 +1,33 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe ChefSpec::Stubs::DataBagStub do
4
- it 'inherts from Stub' do
4
+ it "inherts from Stub" do
5
5
  expect(described_class.superclass).to be(ChefSpec::Stubs::Stub)
6
6
  end
7
7
 
8
- describe '#initialize' do
9
- it 'sets the bag and block' do
8
+ describe "#initialize" do
9
+ it "sets the bag and block" do
10
10
  block = Proc.new {}
11
- stub = described_class.new('bag', &block)
11
+ stub = described_class.new("bag", &block)
12
12
 
13
- expect(stub.bag).to eq('bag')
13
+ expect(stub.bag).to eq("bag")
14
14
  expect(stub.block).to eq(block)
15
15
  end
16
16
  end
17
17
 
18
- describe '#signature' do
19
- context 'when a value is given' do
20
- subject { described_class.new('bag').and_return(false) }
18
+ describe "#signature" do
19
+ context "when a value is given" do
20
+ subject { described_class.new("bag").and_return(false) }
21
21
 
22
- it 'includes the value' do
22
+ it "includes the value" do
23
23
  expect(subject.signature).to eq('stub_data_bag("bag").and_return(false)')
24
24
  end
25
25
  end
26
26
 
27
- context 'when a block is given' do
28
- subject { described_class.new('bag') { 1 == 2 } }
27
+ context "when a block is given" do
28
+ subject { described_class.new("bag") { 1 == 2 } }
29
29
 
30
- it 'includes a comment about the block' do
30
+ it "includes a comment about the block" do
31
31
  expect(subject.signature).to eq('stub_data_bag("bag") { # Ruby code }')
32
32
  end
33
33
  end
@@ -1,10 +1,10 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe ChefSpec::Stubs::Registry do
4
4
  before { described_class.reset! }
5
5
 
6
- describe '#reset!' do
7
- it 'cleans the list of stubs' do
6
+ describe "#reset!" do
7
+ it "cleans the list of stubs" do
8
8
  described_class.stubs = [1, 2, 3]
9
9
  described_class.reset!
10
10
 
@@ -12,15 +12,15 @@ describe ChefSpec::Stubs::Registry do
12
12
  end
13
13
  end
14
14
 
15
- describe '#register' do
16
- it 'adds the stub to the registry' do
17
- described_class.register('bacon')
18
- expect(described_class.stubs).to include('bacon')
15
+ describe "#register" do
16
+ it "adds the stub to the registry" do
17
+ described_class.register("bacon")
18
+ expect(described_class.stubs).to include("bacon")
19
19
  end
20
20
  end
21
21
 
22
- describe '#stub_for' do
23
- it 'finds a stub by name' do
22
+ describe "#stub_for" do
23
+ it "finds a stub by name" do
24
24
  expect {
25
25
  described_class.stub_for
26
26
  }.to raise_error(ArgumentError)