chefspec 5.0.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (443) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +17 -25
  3. data/CHANGELOG.md +506 -371
  4. data/Gemfile +9 -0
  5. data/README.md +118 -75
  6. data/chefspec.gemspec +4 -5
  7. data/examples/apt_package/recipes/purge.rb +2 -2
  8. data/examples/apt_package/recipes/reconfig.rb +2 -2
  9. data/examples/apt_package/recipes/remove.rb +2 -2
  10. data/examples/apt_package/recipes/upgrade.rb +2 -2
  11. data/examples/apt_package/spec/install_spec.rb +4 -1
  12. data/examples/apt_package/spec/purge_spec.rb +4 -1
  13. data/examples/apt_package/spec/reconfig_spec.rb +4 -1
  14. data/examples/apt_package/spec/remove_spec.rb +4 -1
  15. data/examples/apt_package/spec/upgrade_spec.rb +4 -1
  16. data/examples/apt_repository/spec/add_spec.rb +4 -1
  17. data/examples/apt_repository/spec/remove_spec.rb +4 -1
  18. data/examples/apt_update/recipes/periodic.rb +1 -1
  19. data/examples/apt_update/spec/periodic_spec.rb +5 -2
  20. data/examples/apt_update/spec/update_spec.rb +4 -1
  21. data/examples/attributes/spec/default_spec.rb +1 -1
  22. data/examples/batch/recipes/run.rb +0 -4
  23. data/examples/batch/spec/run_spec.rb +4 -10
  24. data/examples/bff_package/recipes/install.rb +13 -0
  25. data/examples/bff_package/recipes/purge.rb +13 -0
  26. data/examples/bff_package/recipes/remove.rb +13 -0
  27. data/examples/bff_package/recipes/upgrade.rb +13 -0
  28. data/examples/bff_package/spec/install_spec.rb +23 -0
  29. data/examples/bff_package/spec/purge_spec.rb +19 -0
  30. data/examples/bff_package/spec/remove_spec.rb +19 -0
  31. data/examples/bff_package/spec/upgrade_spec.rb +19 -0
  32. data/examples/cab_package/recipes/install.rb +13 -0
  33. data/examples/cab_package/recipes/remove.rb +13 -0
  34. data/examples/cab_package/spec/install_spec.rb +26 -0
  35. data/examples/cab_package/spec/remove_spec.rb +22 -0
  36. data/examples/cached/spec/default_spec.rb +1 -1
  37. data/examples/chef_gem/spec/install_spec.rb +1 -1
  38. data/examples/chef_gem/spec/purge_spec.rb +1 -1
  39. data/examples/chef_gem/spec/reconfig_spec.rb +1 -1
  40. data/examples/chef_gem/spec/remove_spec.rb +1 -1
  41. data/examples/chef_gem/spec/upgrade_spec.rb +1 -1
  42. data/examples/chocolatey_package/spec/install_spec.rb +4 -6
  43. data/examples/chocolatey_package/spec/remove_spec.rb +4 -6
  44. data/examples/chocolatey_package/spec/upgrade_spec.rb +4 -6
  45. data/examples/compile_time/spec/default_spec.rb +1 -1
  46. data/examples/cookbook_file/spec/create_if_missing_spec.rb +3 -3
  47. data/examples/cookbook_file/spec/create_spec.rb +3 -3
  48. data/examples/cookbook_file/spec/delete_spec.rb +1 -1
  49. data/examples/cookbook_file/spec/touch_spec.rb +1 -1
  50. data/examples/cron/spec/create_spec.rb +1 -1
  51. data/examples/cron/spec/delete_spec.rb +1 -1
  52. data/examples/custom_matcher/providers/thing.rb +1 -1
  53. data/examples/custom_matcher/spec/install_spec.rb +1 -1
  54. data/examples/custom_matcher/spec/remove_spec.rb +1 -1
  55. data/examples/custom_resource/libraries/matchers.rb +5 -0
  56. data/examples/custom_resource/recipes/default.rb +1 -0
  57. data/examples/custom_resource/resources/custom_resource.rb +9 -0
  58. data/examples/custom_resource/spec/default_spec.rb +18 -0
  59. data/examples/deploy/spec/deploy_spec.rb +1 -1
  60. data/examples/deploy/spec/force_deploy_spec.rb +1 -1
  61. data/examples/deploy/spec/rollback_spec.rb +1 -1
  62. data/examples/directory/spec/create_spec.rb +4 -4
  63. data/examples/directory/spec/delete_spec.rb +3 -3
  64. data/examples/dnf_package/recipes/install.rb +13 -0
  65. data/examples/dnf_package/recipes/purge.rb +13 -0
  66. data/examples/dnf_package/recipes/remove.rb +13 -0
  67. data/examples/dnf_package/recipes/upgrade.rb +13 -0
  68. data/examples/dnf_package/spec/install_spec.rb +26 -0
  69. data/examples/dnf_package/spec/purge_spec.rb +22 -0
  70. data/examples/dnf_package/spec/remove_spec.rb +22 -0
  71. data/examples/dnf_package/spec/upgrade_spec.rb +22 -0
  72. data/examples/do_nothing/spec/default_spec.rb +1 -1
  73. data/examples/dpkg_package/spec/install_spec.rb +4 -6
  74. data/examples/dpkg_package/spec/purge_spec.rb +4 -6
  75. data/examples/dpkg_package/spec/remove_spec.rb +4 -6
  76. data/examples/dsc_resource/recipes/{default.rb → run.rb} +6 -6
  77. data/examples/dsc_resource/spec/{default_spec.rb → run_spec.rb} +8 -10
  78. data/examples/dsc_script/recipes/run.rb +12 -0
  79. data/examples/dsc_script/spec/run_spec.rb +16 -0
  80. data/examples/env/spec/create_spec.rb +4 -6
  81. data/examples/env/spec/delete_spec.rb +4 -6
  82. data/examples/env/spec/modify_spec.rb +4 -6
  83. data/examples/erl_call/spec/run_spec.rb +1 -1
  84. data/examples/execute/spec/run_spec.rb +1 -1
  85. data/examples/expect_exception/spec/compile_error_spec.rb +1 -1
  86. data/examples/expect_exception/spec/converge_error_spec.rb +1 -1
  87. data/examples/expect_exception/spec/no_error_spec.rb +1 -1
  88. data/examples/file/spec/create_if_missing_spec.rb +3 -3
  89. data/examples/file/spec/create_spec.rb +3 -3
  90. data/examples/file/spec/delete_spec.rb +1 -1
  91. data/examples/file/spec/touch_spec.rb +1 -1
  92. data/examples/freebsd_package/spec/install_spec.rb +4 -1
  93. data/examples/freebsd_package/spec/remove_spec.rb +4 -1
  94. data/examples/gem_package/spec/install_spec.rb +1 -1
  95. data/examples/gem_package/spec/purge_spec.rb +1 -1
  96. data/examples/gem_package/spec/reconfig_spec.rb +1 -1
  97. data/examples/gem_package/spec/remove_spec.rb +1 -1
  98. data/examples/gem_package/spec/upgrade_spec.rb +1 -1
  99. data/examples/git/spec/checkout_spec.rb +1 -1
  100. data/examples/git/spec/export_spec.rb +1 -1
  101. data/examples/git/spec/sync_spec.rb +1 -1
  102. data/examples/group/spec/create_spec.rb +1 -1
  103. data/examples/group/spec/manage_spec.rb +1 -1
  104. data/examples/group/spec/modify_spec.rb +1 -1
  105. data/examples/group/spec/remove_spec.rb +1 -1
  106. data/examples/guards/spec/default_spec.rb +1 -1
  107. data/examples/heavy_provider_light_resource/libraries/resource_service.rb +1 -1
  108. data/examples/heavy_provider_light_resource/recipes/default.rb +1 -2
  109. data/examples/heavy_provider_light_resource/spec/provider_service_spec.rb +2 -2
  110. data/examples/homebrew_package/recipes/install.rb +13 -0
  111. data/examples/homebrew_package/recipes/purge.rb +13 -0
  112. data/examples/homebrew_package/recipes/remove.rb +13 -0
  113. data/examples/homebrew_package/recipes/upgrade.rb +13 -0
  114. data/examples/homebrew_package/spec/install_spec.rb +23 -0
  115. data/examples/homebrew_package/spec/purge_spec.rb +19 -0
  116. data/examples/homebrew_package/spec/remove_spec.rb +19 -0
  117. data/examples/homebrew_package/spec/upgrade_spec.rb +19 -0
  118. data/examples/http_request/spec/delete_spec.rb +1 -1
  119. data/examples/http_request/spec/get_spec.rb +1 -1
  120. data/examples/http_request/spec/head_spec.rb +1 -1
  121. data/examples/http_request/spec/options_spec.rb +1 -1
  122. data/examples/http_request/spec/post_spec.rb +1 -1
  123. data/examples/http_request/spec/put_spec.rb +1 -1
  124. data/examples/ifconfig/spec/add_spec.rb +1 -1
  125. data/examples/ifconfig/spec/delete_spec.rb +1 -1
  126. data/examples/ifconfig/spec/disable_spec.rb +1 -1
  127. data/examples/ifconfig/spec/enable_spec.rb +1 -1
  128. data/examples/include_recipe/spec/default_spec.rb +1 -1
  129. data/examples/ips_package/spec/install_spec.rb +4 -6
  130. data/examples/ips_package/spec/remove_spec.rb +4 -6
  131. data/examples/ips_package/spec/upgrade_spec.rb +4 -6
  132. data/examples/launchd/recipes/create.rb +5 -0
  133. data/examples/launchd/recipes/create_if_missing.rb +3 -0
  134. data/examples/launchd/recipes/delete.rb +3 -0
  135. data/examples/launchd/recipes/disable.rb +3 -0
  136. data/examples/launchd/recipes/enable.rb +3 -0
  137. data/examples/launchd/spec/create_if_missing_spec.rb +10 -0
  138. data/examples/launchd/spec/create_spec.rb +14 -0
  139. data/examples/launchd/spec/delete_spec.rb +10 -0
  140. data/examples/launchd/spec/disable_spec.rb +10 -0
  141. data/examples/launchd/spec/enable_spec.rb +10 -0
  142. data/examples/link/spec/create_spec.rb +1 -1
  143. data/examples/link/spec/delete_spec.rb +1 -1
  144. data/examples/link/spec/link_to_spec.rb +1 -1
  145. data/examples/log/spec/write_spec.rb +1 -1
  146. data/examples/macports_package/spec/install_spec.rb +1 -1
  147. data/examples/macports_package/spec/purge_spec.rb +1 -1
  148. data/examples/macports_package/spec/remove_spec.rb +1 -1
  149. data/examples/macports_package/spec/upgrade_spec.rb +1 -1
  150. data/examples/mdadm/spec/assemble_spec.rb +1 -1
  151. data/examples/mdadm/spec/create_spec.rb +1 -1
  152. data/examples/mdadm/spec/stop_spec.rb +1 -1
  153. data/examples/mount/spec/disable_spec.rb +1 -1
  154. data/examples/mount/spec/enable_spec.rb +1 -1
  155. data/examples/mount/spec/mount_spec.rb +1 -1
  156. data/examples/mount/spec/remount_spec.rb +1 -1
  157. data/examples/mount/spec/umount_spec.rb +1 -1
  158. data/examples/msu_package/recipes/install.rb +13 -0
  159. data/examples/msu_package/recipes/remove.rb +13 -0
  160. data/examples/msu_package/spec/install_spec.rb +26 -0
  161. data/examples/msu_package/spec/remove_spec.rb +22 -0
  162. data/examples/multiple_actions/recipes/reversed.rb +9 -0
  163. data/examples/multiple_actions/recipes/sequential.rb +5 -3
  164. data/examples/multiple_actions/spec/default_spec.rb +1 -1
  165. data/examples/multiple_actions/spec/reversed_spec.rb +17 -0
  166. data/examples/multiple_actions/spec/sequential_spec.rb +5 -4
  167. data/examples/multiple_run_action/recipes/default.rb +2 -2
  168. data/examples/multiple_run_action/spec/default_spec.rb +1 -1
  169. data/examples/notifications/spec/before_spec.rb +1 -1
  170. data/examples/notifications/spec/chained_spec.rb +1 -1
  171. data/examples/notifications/spec/default_spec.rb +1 -1
  172. data/examples/notifications/spec/delayed_spec.rb +1 -1
  173. data/examples/notifications/spec/immediately_spec.rb +1 -1
  174. data/examples/ohai/spec/reload_spec.rb +1 -1
  175. data/examples/openbsd_package/recipes/install.rb +13 -0
  176. data/examples/openbsd_package/recipes/purge.rb +13 -0
  177. data/examples/openbsd_package/recipes/remove.rb +13 -0
  178. data/examples/openbsd_package/recipes/upgrade.rb +13 -0
  179. data/examples/openbsd_package/spec/install_spec.rb +23 -0
  180. data/examples/openbsd_package/spec/purge_spec.rb +19 -0
  181. data/examples/openbsd_package/spec/remove_spec.rb +19 -0
  182. data/examples/openbsd_package/spec/upgrade_spec.rb +19 -0
  183. data/examples/osx_profile/recipes/install.rb +8 -0
  184. data/examples/osx_profile/recipes/remove.rb +8 -0
  185. data/examples/osx_profile/spec/install_spec.rb +15 -0
  186. data/examples/osx_profile/spec/remove_spec.rb +13 -0
  187. data/examples/package/recipes/install.rb +1 -1
  188. data/examples/package/recipes/purge.rb +1 -1
  189. data/examples/package/recipes/reconfig.rb +1 -1
  190. data/examples/package/recipes/remove.rb +1 -1
  191. data/examples/package/recipes/upgrade.rb +1 -1
  192. data/examples/package/spec/install_spec.rb +2 -2
  193. data/examples/package/spec/purge_spec.rb +2 -2
  194. data/examples/package/spec/reconfig_spec.rb +2 -2
  195. data/examples/package/spec/remove_spec.rb +2 -2
  196. data/examples/package/spec/upgrade_spec.rb +2 -2
  197. data/examples/pacman_package/spec/install_spec.rb +4 -6
  198. data/examples/pacman_package/spec/purge_spec.rb +4 -6
  199. data/examples/pacman_package/spec/remove_spec.rb +4 -6
  200. data/examples/pacman_package/spec/upgrade_spec.rb +4 -6
  201. data/examples/paludis_package/recipes/install.rb +13 -0
  202. data/examples/paludis_package/recipes/purge.rb +13 -0
  203. data/examples/paludis_package/recipes/remove.rb +13 -0
  204. data/examples/paludis_package/recipes/upgrade.rb +13 -0
  205. data/examples/paludis_package/spec/install_spec.rb +23 -0
  206. data/examples/paludis_package/spec/purge_spec.rb +19 -0
  207. data/examples/paludis_package/spec/remove_spec.rb +19 -0
  208. data/examples/paludis_package/spec/upgrade_spec.rb +19 -0
  209. data/examples/portage_package/spec/install_spec.rb +4 -1
  210. data/examples/portage_package/spec/purge_spec.rb +4 -1
  211. data/examples/portage_package/spec/remove_spec.rb +4 -1
  212. data/examples/portage_package/spec/upgrade_spec.rb +4 -1
  213. data/examples/powershell_script/recipes/run.rb +0 -4
  214. data/examples/powershell_script/spec/run_spec.rb +4 -10
  215. data/examples/reboot/spec/cancel_spec.rb +1 -2
  216. data/examples/reboot/spec/now_spec.rb +1 -2
  217. data/examples/reboot/spec/request_spec.rb +1 -2
  218. data/examples/registry_key/spec/create_if_missing_spec.rb +4 -1
  219. data/examples/registry_key/spec/create_spec.rb +4 -1
  220. data/examples/registry_key/spec/delete_key_spec.rb +4 -1
  221. data/examples/registry_key/spec/delete_spec.rb +4 -1
  222. data/examples/remote_directory/spec/create_if_missing_spec.rb +1 -1
  223. data/examples/remote_directory/spec/create_spec.rb +1 -1
  224. data/examples/remote_directory/spec/delete_spec.rb +1 -1
  225. data/examples/remote_file/spec/create_if_missing_spec.rb +1 -1
  226. data/examples/remote_file/spec/create_spec.rb +1 -1
  227. data/examples/remote_file/spec/delete_spec.rb +1 -1
  228. data/examples/remote_file/spec/touch_spec.rb +1 -1
  229. data/examples/render_file/spec/default_spec.rb +1 -1
  230. data/examples/render_file/spec/template_helpers_spec.rb +1 -1
  231. data/examples/roles/roles/role.rb +4 -4
  232. data/examples/roles/spec/default_spec.rb +1 -1
  233. data/examples/route/spec/add_spec.rb +1 -1
  234. data/examples/route/spec/delete_spec.rb +1 -1
  235. data/examples/rpm_package/spec/install_spec.rb +4 -6
  236. data/examples/rpm_package/spec/remove_spec.rb +4 -6
  237. data/examples/rpm_package/spec/upgrade_spec.rb +4 -6
  238. data/examples/ruby_block/recipes/create.rb +8 -0
  239. data/examples/ruby_block/spec/create_spec.rb +13 -0
  240. data/examples/ruby_block/spec/run_spec.rb +1 -1
  241. data/examples/script/recipes/run_bash.rb +0 -4
  242. data/examples/script/recipes/run_csh.rb +0 -4
  243. data/examples/script/recipes/run_ksh.rb +9 -0
  244. data/examples/script/recipes/run_perl.rb +0 -4
  245. data/examples/script/recipes/run_python.rb +0 -4
  246. data/examples/script/recipes/run_ruby.rb +0 -4
  247. data/examples/script/recipes/run_script.rb +0 -4
  248. data/examples/script/spec/run_bash_spec.rb +1 -5
  249. data/examples/script/spec/run_csh_spec.rb +1 -5
  250. data/examples/script/spec/run_ksh_spec.rb +19 -0
  251. data/examples/script/spec/run_perl_spec.rb +1 -5
  252. data/examples/script/spec/run_python_spec.rb +1 -5
  253. data/examples/script/spec/run_ruby_spec.rb +1 -5
  254. data/examples/script/spec/run_script_spec.rb +1 -5
  255. data/examples/server/spec/client_spec.rb +2 -2
  256. data/examples/server/spec/data_bag_spec.rb +9 -11
  257. data/examples/server/spec/environment_spec.rb +1 -1
  258. data/examples/server/spec/exotic_port_spec.rb +17 -0
  259. data/examples/server/spec/node_spec.rb +6 -6
  260. data/examples/server/spec/render_with_cached_spec.rb +1 -1
  261. data/examples/server/spec/role_spec.rb +1 -1
  262. data/examples/server/spec/search_spec.rb +2 -2
  263. data/examples/service/recipes/disable.rb +1 -1
  264. data/examples/service/recipes/enable.rb +1 -1
  265. data/examples/service/recipes/reload.rb +1 -1
  266. data/examples/service/recipes/restart.rb +1 -1
  267. data/examples/service/recipes/start.rb +1 -1
  268. data/examples/service/recipes/stop.rb +1 -1
  269. data/examples/service/spec/disable_spec.rb +1 -1
  270. data/examples/service/spec/enable_spec.rb +1 -1
  271. data/examples/service/spec/reload_spec.rb +1 -1
  272. data/examples/service/spec/restart_spec.rb +1 -1
  273. data/examples/service/spec/start_spec.rb +1 -1
  274. data/examples/service/spec/stop_spec.rb +1 -1
  275. data/examples/smartos_package/spec/install_spec.rb +4 -1
  276. data/examples/smartos_package/spec/remove_spec.rb +4 -1
  277. data/examples/smartos_package/spec/upgrade_spec.rb +4 -1
  278. data/examples/solaris_package/recipes/upgrade.rb +13 -0
  279. data/examples/solaris_package/spec/install_spec.rb +4 -1
  280. data/examples/solaris_package/spec/remove_spec.rb +4 -1
  281. data/examples/solaris_package/spec/upgrade_spec.rb +22 -0
  282. data/examples/state_attrs/providers/lwrp.rb +0 -1
  283. data/examples/state_attrs/spec/default_spec.rb +1 -1
  284. data/examples/step_into/spec/default_spec.rb +4 -4
  285. data/examples/stub_command/spec/default_spec.rb +3 -3
  286. data/examples/stub_data_bag/spec/default_spec.rb +3 -3
  287. data/examples/stub_data_bag_item/spec/default_spec.rb +5 -5
  288. data/examples/stub_search/recipes/block.rb +3 -0
  289. data/examples/stub_search/recipes/default.rb +2 -5
  290. data/examples/stub_search/spec/block_spec.rb +27 -0
  291. data/examples/stub_search/spec/default_spec.rb +5 -5
  292. data/examples/subscribes/spec/before_spec.rb +1 -1
  293. data/examples/subscribes/spec/chained_spec.rb +1 -1
  294. data/examples/subscribes/spec/default_spec.rb +1 -2
  295. data/examples/subscribes/spec/delayed_spec.rb +1 -1
  296. data/examples/subscribes/spec/immediately_spec.rb +1 -1
  297. data/examples/subversion/spec/checkout_spec.rb +1 -1
  298. data/examples/subversion/spec/export_spec.rb +1 -1
  299. data/examples/subversion/spec/force_export_spec.rb +1 -1
  300. data/examples/subversion/spec/sync_spec.rb +1 -1
  301. data/examples/systemd_unit/recipes/create.rb +3 -0
  302. data/examples/systemd_unit/recipes/delete.rb +3 -0
  303. data/examples/systemd_unit/recipes/disable.rb +3 -0
  304. data/examples/systemd_unit/recipes/enable.rb +3 -0
  305. data/examples/systemd_unit/recipes/mask.rb +3 -0
  306. data/examples/systemd_unit/recipes/reload_or_restart.rb +3 -0
  307. data/examples/systemd_unit/recipes/reload_or_try_restart.rb +3 -0
  308. data/examples/systemd_unit/recipes/restart.rb +3 -0
  309. data/examples/systemd_unit/recipes/start.rb +3 -0
  310. data/examples/systemd_unit/recipes/stop.rb +3 -0
  311. data/examples/systemd_unit/recipes/try_restart.rb +3 -0
  312. data/examples/systemd_unit/recipes/unmask.rb +3 -0
  313. data/examples/systemd_unit/spec/create_spec.rb +10 -0
  314. data/examples/systemd_unit/spec/delete_spec.rb +10 -0
  315. data/examples/systemd_unit/spec/disable_spec.rb +10 -0
  316. data/examples/systemd_unit/spec/enable_spec.rb +10 -0
  317. data/examples/systemd_unit/spec/mask_spec.rb +10 -0
  318. data/examples/systemd_unit/spec/reload_or_restart_spec.rb +10 -0
  319. data/examples/systemd_unit/spec/reload_or_try_restart_spec.rb +10 -0
  320. data/examples/systemd_unit/spec/restart_spec.rb +10 -0
  321. data/examples/systemd_unit/spec/start_spec.rb +10 -0
  322. data/examples/systemd_unit/spec/stop_spec.rb +10 -0
  323. data/examples/systemd_unit/spec/try_restart_spec.rb +10 -0
  324. data/examples/systemd_unit/spec/unmask_spec.rb +10 -0
  325. data/examples/template/spec/create_if_missing_spec.rb +3 -3
  326. data/examples/template/spec/create_spec.rb +3 -3
  327. data/examples/template/spec/delete_spec.rb +1 -1
  328. data/examples/template/spec/touch_spec.rb +1 -1
  329. data/examples/use_inline_resources/spec/default_spec.rb +3 -3
  330. data/examples/user/spec/create_spec.rb +4 -1
  331. data/examples/user/spec/lock_spec.rb +4 -1
  332. data/examples/user/spec/manage_spec.rb +4 -1
  333. data/examples/user/spec/modify_spec.rb +4 -1
  334. data/examples/user/spec/remove_spec.rb +4 -1
  335. data/examples/user/spec/unlock_spec.rb +4 -1
  336. data/examples/windows_package/spec/install_spec.rb +4 -6
  337. data/examples/windows_package/spec/remove_spec.rb +4 -6
  338. data/examples/windows_service/spec/configure_startup_spec.rb +4 -6
  339. data/examples/windows_service/spec/disable_spec.rb +4 -6
  340. data/examples/windows_service/spec/enable_spec.rb +4 -6
  341. data/examples/windows_service/spec/reload_spec.rb +4 -6
  342. data/examples/windows_service/spec/restart_spec.rb +4 -6
  343. data/examples/windows_service/spec/start_spec.rb +4 -6
  344. data/examples/windows_service/spec/stop_spec.rb +4 -6
  345. data/examples/yum_package/spec/install_spec.rb +4 -1
  346. data/examples/yum_package/spec/purge_spec.rb +4 -1
  347. data/examples/yum_package/spec/remove_spec.rb +4 -1
  348. data/examples/yum_package/spec/upgrade_spec.rb +4 -1
  349. data/examples/yum_repository/recipes/add.rb +8 -0
  350. data/examples/yum_repository/recipes/create.rb +8 -0
  351. data/examples/yum_repository/recipes/delete.rb +3 -0
  352. data/examples/yum_repository/recipes/makecache.rb +3 -0
  353. data/examples/yum_repository/recipes/remove.rb +7 -0
  354. data/examples/yum_repository/spec/add_spec.rb +12 -0
  355. data/examples/yum_repository/spec/create_spec.rb +17 -0
  356. data/examples/yum_repository/spec/delete_spec.rb +12 -0
  357. data/examples/yum_repository/spec/makecache_spec.rb +12 -0
  358. data/examples/yum_repository/spec/remove_spec.rb +12 -0
  359. data/examples/zypper_package/recipes/install.rb +13 -0
  360. data/examples/zypper_package/recipes/purge.rb +13 -0
  361. data/examples/zypper_package/recipes/remove.rb +13 -0
  362. data/examples/zypper_package/recipes/upgrade.rb +13 -0
  363. data/examples/zypper_package/spec/install_spec.rb +23 -0
  364. data/examples/zypper_package/spec/purge_spec.rb +19 -0
  365. data/examples/zypper_package/spec/remove_spec.rb +19 -0
  366. data/examples/zypper_package/spec/upgrade_spec.rb +19 -0
  367. data/features/apt_repository.feature +15 -0
  368. data/features/apt_update.feature +13 -0
  369. data/features/attributes.feature +1 -1
  370. data/features/bff_package.feature +12 -0
  371. data/features/cab_package.feature +21 -0
  372. data/features/chocolatey_package.feature +1 -6
  373. data/features/compile_time.feature +1 -1
  374. data/features/custom_resource.feature +7 -0
  375. data/features/dnf_package.feature +26 -0
  376. data/features/dsc_resource.feature +5 -4
  377. data/features/dsc_script.feature +10 -0
  378. data/features/exotic_zero_port.feature +7 -0
  379. data/features/homebrew_package.feature +12 -0
  380. data/features/launchd.feature +17 -0
  381. data/features/msu_package.feature +23 -0
  382. data/features/multiple_actions.feature +1 -0
  383. data/features/notifications.feature +0 -7
  384. data/features/openbsd_package.feature +12 -0
  385. data/features/osx_profile.feature +13 -0
  386. data/features/paludis_package.feature +12 -0
  387. data/features/roles.feature +1 -1
  388. data/features/ruby_block.feature +1 -0
  389. data/features/script.feature +1 -0
  390. data/features/server_on_disk.feature +16 -0
  391. data/features/solaris_package.feature +1 -0
  392. data/features/stub_search.feature +1 -1
  393. data/features/subscribes.feature +0 -7
  394. data/features/support/env.rb +8 -0
  395. data/features/support/exotic_zero_port.rb +3 -0
  396. data/features/support/on_disk.rb +7 -0
  397. data/features/systemd_unit.feature +27 -0
  398. data/features/windows_package.feature +0 -4
  399. data/features/yum_repository.feature +23 -0
  400. data/features/{easy_install_package.feature → zypper_package.feature} +2 -2
  401. data/lib/chefspec/api/bff_package.rb +154 -0
  402. data/lib/chefspec/api/cab_package.rb +80 -0
  403. data/lib/chefspec/api/dnf_package.rb +154 -0
  404. data/lib/chefspec/api/dsc_script.rb +37 -0
  405. data/lib/chefspec/api/homebrew_package.rb +154 -0
  406. data/lib/chefspec/api/launchd.rb +151 -0
  407. data/lib/chefspec/api/msu_package.rb +81 -0
  408. data/lib/chefspec/api/openbsd_package.rb +155 -0
  409. data/lib/chefspec/api/osx_profile.rb +63 -0
  410. data/lib/chefspec/api/paludis_package.rb +155 -0
  411. data/lib/chefspec/api/ruby_block.rb +31 -0
  412. data/lib/chefspec/api/script.rb +39 -0
  413. data/lib/chefspec/api/solaris_package.rb +37 -0
  414. data/lib/chefspec/api/systemd_unit.rb +353 -0
  415. data/lib/chefspec/api/yum_repository.rb +130 -0
  416. data/lib/chefspec/api/zypper_package.rb +154 -0
  417. data/lib/chefspec/api.rb +15 -0
  418. data/lib/chefspec/coverage.rb +25 -7
  419. data/lib/chefspec/extensions/chef/data_query.rb +6 -1
  420. data/lib/chefspec/extensions/chef/lwrp_base.rb +21 -35
  421. data/lib/chefspec/macros.rb +1 -1
  422. data/lib/chefspec/matchers/resource_matcher.rb +20 -27
  423. data/lib/chefspec/rspec.rb +3 -0
  424. data/lib/chefspec/server_methods.rb +9 -12
  425. data/lib/chefspec/server_runner.rb +2 -42
  426. data/lib/chefspec/solo_runner.rb +11 -10
  427. data/lib/chefspec/version.rb +1 -1
  428. data/lib/chefspec/zero_server.rb +140 -0
  429. data/lib/chefspec.rb +0 -1
  430. data/spec/unit/macros_spec.rb +2 -2
  431. data/spec/unit/solo_runner_spec.rb +3 -2
  432. data/templates/errors/may_need_to_specify_platform.erb +1 -1
  433. metadata +195 -26
  434. data/examples/easy_install_package/recipes/install.rb +0 -13
  435. data/examples/easy_install_package/recipes/purge.rb +0 -13
  436. data/examples/easy_install_package/recipes/remove.rb +0 -13
  437. data/examples/easy_install_package/recipes/upgrade.rb +0 -13
  438. data/examples/easy_install_package/spec/install_spec.rb +0 -23
  439. data/examples/easy_install_package/spec/purge_spec.rb +0 -19
  440. data/examples/easy_install_package/spec/remove_spec.rb +0 -19
  441. data/examples/easy_install_package/spec/upgrade_spec.rb +0 -19
  442. data/gemfiles/chefspec.gemfile +0 -15
  443. data/lib/chefspec/chef_backwards_compat.rb +0 -79
data/CHANGELOG.md CHANGED
@@ -1,642 +1,777 @@
1
1
  # CHANGELOG for ChefSpec
2
2
 
3
+ ## 7.0.0 (April, 18, 2017)
4
+
5
+ - Increased the chef gem dependency from 12.6+ to 12.14+. Since ChefSpec is consumed within ChefDK this actually has a minor impact on end users who generally consume Chefspec via ChefDK, which will bundle both compatible chef and chefspec releases.
6
+ - Fixed incompatibilities with Chef 13.
7
+ - Loosened the Fauxhai dependency to allow for the upcoming Fauxhai 5.0 release.
8
+ - Removed easy_install_package testing and examples as easy_install_package was removed in Chef 13\. The actual matcher is still present for users with existing specs against Chef 12 cookbooks.
9
+ - Added additional testing and an example for LWRPs with use_inline_resources defined.
10
+ - Added testing against Chef 13 and Ruby 2.4.
11
+ - Removed code that supported Chef < 12.5.
12
+
13
+ ## 6.2.0 (March 27, 2017)
14
+
15
+ - Correctly handle the block form of search() when using stubs
16
+ - Add support for alternative reporting output from Coverage.report!
17
+
18
+ ## 6.1.0 (March 9, 2017)
19
+
20
+ - Loosen the Fauxhai dependency to allow Fauxhai 4.0 This deprecates a large number of Ohai mocks for end of life platforms. See <https://github.com/customink/fauxhai/blob/master/PLATFORMS.md> for the current list of platforms supported by Fauxhai
21
+ - SoloRunner defaults to use_policyfile == false now
22
+
23
+ ## 6.0.1 (February 24, 2017)
24
+
25
+ - Add the ability to set the Chef Zero port range used by the ServerRunner
26
+
27
+ ## 6.0.0 (February 22, 2017)
28
+
29
+ BREAKING CHANGES
30
+
31
+ ChefSpec now requires Ruby 2.2 or later.
32
+
33
+ IMPROVEMENTS
34
+
35
+ - Improve ServerRunner speed and reduce process hangs by using a single stand-alone chef-zero server.
36
+ - Add configuration value to dictate whether cookbooks are re-uploaded before every test context.
37
+ - Added matchers for dnf_package, msu_package, and cab_package
38
+
39
+ ## 5.4.0 (February 9, 2017)
40
+
41
+ IMPROVEMENTS
42
+
43
+ - Support for in-memory or on-disk ChefZero Servers. See README for usage details.
44
+
45
+ UPDATES
46
+
47
+ - While Chef 12.0 - 12.5 are still supported, they are no longer being tested.
48
+
49
+ ## 5.3.0 (October 29, 2016)
50
+
51
+ IMPROVEMENTS
52
+
53
+ - Added all missing matchers for built-in chef-client resources
54
+
55
+ - osx_profile
56
+ - zypper_package
57
+ - systemd_unit
58
+ - openbsd_package
59
+ - launchd
60
+ - homebrew_package
61
+ - bff_package
62
+
63
+ BUG FIXES
64
+
65
+ - Fixed readme examples to properly specify the platform / platform version and to use a cache dir that will work on Windows
66
+
67
+ ## 5.2.0 (September 21, 2016)
68
+
69
+ IMPROVEMENTS
70
+
71
+ - Added platform and versions to all examples to avoid deprecation warnings from Fauxhai
72
+ - Allow modifications to node object before converge
73
+
74
+ BUG FIXES
75
+
76
+ - Fix makecache matcher for yum_repository
77
+
78
+ ## 5.1.1 (September 14, 2016)
79
+
80
+ BUG FIXES
81
+
82
+ - Add missing matchers for yum_repository
83
+
84
+ ## 5.1.0 (September 14, 2016)
85
+
86
+ IMPROVEMENTS
87
+
88
+ - Add dsc_script matcher
89
+ - Add yum_repository matcher
90
+ - Resolve cookstyle warnings in example recipes and specs
91
+ - Mock out platforms in the example specs so they're easier to adopt
92
+ - Switch all example specs to SoloRunner as this is the preferred runner for Chef Server / Chef Zero users
93
+
94
+ BUG FIXES
95
+
96
+ - Fixes apt_update and apt_repository matchers to work
97
+
3
98
  ## 5.0.0 (August 24, 2016)
4
99
 
5
100
  IMPROVEMENTS
6
101
 
7
- - Require a minimum of Chef 12.0
8
- - Add custom templating to Coverage Reporting. See readme for details
9
- - Add matcher for apt_repository resource
10
- - Add matcher for apt_update resource
11
- - Add support for the :before notification
12
- - Allow stubbing encrypted databags loaded with data_bag_item
13
- - Add testing against Chef 12.8 - 12.3
102
+ - Require a minimum of Chef 12.0
103
+ - Add custom templating to Coverage Reporting. See readme for details
104
+ - Add matcher for apt_repository resource
105
+ - Add matcher for apt_update resource
106
+ - Add support for the :before notification
107
+ - Allow stubbing encrypted databags loaded with data_bag_item
108
+ - Add testing against Chef 12.8 - 12.3
14
109
 
15
110
  BUG FIXES
16
111
 
17
- - Update docs/examples to use node.normal instead of node.set, which has been deprecated
18
- - Update user spec examples to specify the platform
19
- - Update docs to clarify the Ruby 2.1 requirement
112
+ - Update docs/examples to use node.normal instead of node.set, which has been deprecated
113
+ - Update user spec examples to specify the platform
114
+ - Update docs to clarify the Ruby 2.1 requirement
20
115
 
21
116
  ## 4.7.0 (May 13, 2016)
22
117
 
23
118
  IMPROVEMENTS
24
119
 
25
- - Support Chef Solo actually being local mode (per Chef RFC 31)
120
+ - Support Chef Solo actually being local mode (per Chef RFC 31)
26
121
 
27
122
  ## 4.6.1 (March 29, 2016)
28
123
 
29
124
  BUG FIXES
30
125
 
31
- - Use the same Chef :file_cache_path in every ChefSpec converge to prevent large numbers of LWRP deprecation warnings
32
- - Require Fauxhai ~3.2 to prevent ChefSpec spec failures
33
- - Require Rake < 11.0 to prevent failures
126
+ - Use the same Chef :file_cache_path in every ChefSpec converge to prevent large numbers of LWRP deprecation warnings
127
+ - Require Fauxhai ~3.2 to prevent ChefSpec spec failures
128
+ - Require Rake < 11.0 to prevent failures
34
129
 
35
130
  ## 4.6.0 (March 7, 2016)
36
131
 
37
132
  IMPROVEMENTS
38
133
 
39
- - Add support for adding `berkshelf_options` to the RSpec config
40
- - Add `chocolately_package` matches
41
- - Support `do..end` style syntax in block expectations
42
- - Output a diff when multi-line resource parameters are unmatched
134
+ - Add support for adding `berkshelf_options` to the RSpec config
135
+ - Add `chocolately_package` matchers
136
+ - Support `do..end` style syntax in block expectations
137
+ - Output a diff when multi-line resource parameters are unmatched
43
138
 
44
139
  BUG FIXES
45
140
 
46
- - Update tests to include better descriptions and feature names
47
- - Add support for Policyfile workflow
141
+ - Update tests to include better descriptions and feature names
142
+ - Add support for Policyfile workflow
48
143
 
49
144
  ## 4.5.0 (December 4, 2015)
50
145
 
51
146
  IMPROVEMENTS
52
- - Update Fauxhai dependency to 3.0 to bring in newly generated mocked Ohai data
147
+
148
+ - Update Fauxhai dependency to 3.0 to bring in newly generated mocked Ohai data
53
149
 
54
150
  ## 4.4.0 (September 18, 2015)
55
151
 
56
152
  BUG FIXES
57
- - Documentation improvements (using regex in stubbed commands, chef 12+ custom matcher gotchas)
58
- - Spec suite improvements (dsc resource specs, platform specific configurations)
59
- - Chef 12+ platform specific resource loading related error
153
+
154
+ - Documentation improvements (using regex in stubbed commands, chef 12+ custom matcher gotchas)
155
+ - Spec suite improvements (dsc resource specs, platform specific configurations)
156
+ - Chef 12+ platform specific resource loading related error
60
157
 
61
158
  IMPROVEMENTS
62
- - Support for policy files
159
+
160
+ - Support for policy files
63
161
 
64
162
  ## 4.3.0 (July 16, 2015)
65
163
 
66
164
  BUG FIXES:
67
- - Improved documentation
68
- - Use TemplateContext's `_extend_modules` for passing on template helper
69
- modules to nested partial templates
70
- - Only exit if the status is a failure [GH-565]
71
- - Fix load order on Windows when using the `rights` attributes
72
- - Improve testing matrix and remove deprecated Chef versions
73
- - Suppress chef_gem compile_time warnings
74
- - Fix exceptions on converge for Chef 12.1.0 masking
75
- - Update Librarian `Cheffile` site URL to supermarket.chef.io
76
- - Filter Windows and Unix paths for test coverage report with Berkshelf
165
+
166
+ - Improved documentation
167
+ - Use TemplateContext's `_extend_modules` for passing on template helper modules to nested partial templates
168
+ - Only exit if the status is a failure [GH-565]
169
+ - Fix load order on Windows when using the `rights` attributes
170
+ - Improve testing matrix and remove deprecated Chef versions
171
+ - Suppress chef_gem compile_time warnings
172
+ - Fix exceptions on converge for Chef 12.1.0 masking
173
+ - Update Librarian `Cheffile` site URL to supermarket.chef.io
174
+ - Filter Windows and Unix paths for test coverage report with Berkshelf
77
175
 
78
176
  IMPROVEMENTS:
79
- - Added possibility to specify file_cache_path globally
80
- - Added new capabilities for reboot resource
81
- - Use `Chef::Resource#declared_type` first if available (Chef >= 12),
82
- otherwise fall back to `Chef::Resource#resource_name` (Chef <= 11)
83
- - Extend render_file to yield the content as a block
84
- - Add windows_service resource
177
+
178
+ - Added possibility to specify file_cache_path globally
179
+ - Added new capabilities for reboot resource
180
+ - Use `Chef::Resource#declared_type` first if available (Chef >= 12), otherwise fall back to `Chef::Resource#resource_name` (Chef <= 11)
181
+ - Extend render_file to yield the content as a block
182
+ - Add windows_service resource
85
183
 
86
184
  ## 4.2.0 (December 25, 2014)
185
+
87
186
  BUG FIXES:
88
- - Updated README grep examples
89
- - Fix various typographical errors
90
- - Improved error message when using a deprecated resource matcher
187
+
188
+ - Updated README grep examples
189
+ - Fix various typographical errors
190
+ - Improved error message when using a deprecated resource matcher
91
191
 
92
192
  IMPROVEMENTS:
93
- - Add support for Chef 12
94
- - Added support for environments in Chef Solo
95
- - Fix location definition for caching
96
- - Allow passing `Chef::Config[:file_cache_path]` from outside
97
- - Update support for Chef 12
193
+
194
+ - Add support for Chef 12
195
+ - Added support for environments in Chef Solo
196
+ - Fix location definition for caching
197
+ - Allow passing `Chef::Config[:file_cache_path]` from outside
198
+ - Update support for Chef 12
98
199
 
99
200
  ## 4.1.1 (October 13, 2014)
201
+
100
202
  BUG FIXES:
101
- - Fix total fail on my part with deprecations and add test coverage
102
- - Do not validate cookbooks on upload (speed)
203
+
204
+ - Fix total fail on my part with deprecations and add test coverage
205
+ - Do not validate cookbooks on upload (speed)
103
206
 
104
207
  ## 4.1.0 (October 12, 2014)
208
+
105
209
  BUG FIXES:
106
- - Bump the minimum required version of Chef to 11.14
107
- - Filter resources that have no source line in the coverage report - this is related to a bug in Chef where, when cloning a resource, both the clone and the original resource lose their metadata
210
+
211
+ - Bump the minimum required version of Chef to 11.14
212
+ - Filter resources that have no source line in the coverage report - this is related to a bug in Chef where, when cloning a resource, both the clone and the original resource lose their metadata
108
213
 
109
214
  IMPROVEMENTS:
110
- - Allow multiple instances of a Chef Server instance
111
- - Separate ChefSpec::Runner into `ChefSpec::SoloRunner` and `ChefSpec::ServerRunner`
112
- - Preliminary support for Chef 12 alpha (not 100% complete)
113
- - Add `SoloRunner` and `ServerRunner` `.converge` methods for quickly converging if you do not need to customize the runner object
114
- - Create isolated Chef Server instances on a per-test or per-suite basis
115
- - Deprecate `ChefSpec::Runner.define_runner_method` in favor of `ChefSpec.define_matcher`
116
- - Deprecate `ChefSpec::Runner.new` - you should specify if you want a `SoloRunner` or `ServerRunner`
117
- - Updated documentation
215
+
216
+ - Allow multiple instances of a Chef Server instance
217
+ - Separate ChefSpec::Runner into `ChefSpec::SoloRunner` and `ChefSpec::ServerRunner`
218
+ - Preliminary support for Chef 12 alpha (not 100% complete)
219
+ - Add `SoloRunner` and `ServerRunner` `.converge` methods for quickly converging if you do not need to customize the runner object
220
+ - Create isolated Chef Server instances on a per-test or per-suite basis
221
+ - Deprecate `ChefSpec::Runner.define_runner_method` in favor of `ChefSpec.define_matcher`
222
+ - Deprecate `ChefSpec::Runner.new` - you should specify if you want a `SoloRunner` or `ServerRunner`
223
+ - Updated documentation
118
224
 
119
225
  BREAKING CHANGES:
120
- - Due to the new `ServerRunner`, the `ChefSpec::Server` singleton object has been deprecated. As much as I would like to provide a backwards-compatible interface, there is no way to do so (as the code now supports multiple Chef Server instances). Sorry :(.
121
- - Remove old deprecations - this is not really a breaking change, but the v2.0.0 deprecations have been removed in favor of new ones
226
+
227
+ - Due to the new `ServerRunner`, the `ChefSpec::Server` singleton object has been deprecated. As much as I would like to provide a backwards-compatible interface, there is no way to do so (as the code now supports multiple Chef Server instances). Sorry :(.
228
+ - Remove old deprecations - this is not really a breaking change, but the v2.0.0 deprecations have been removed in favor of new ones
122
229
 
123
230
  ## 4.0.2 (August 13, 2014)
231
+
124
232
  BUG FIXES:
125
- - Fix a regression caused by a new version of Chef Zero in single_org mode
233
+
234
+ - Fix a regression caused by a new version of Chef Zero in single_org mode
126
235
 
127
236
  IMPROVEMENTS:
128
- - Test against Chef 11.14.0 in the Travis matrix
237
+
238
+ - Test against Chef 11.14.0 in the Travis matrix
129
239
 
130
240
  ## 4.0.1 (June 27, 2014)
241
+
131
242
  BUG FIXES:
132
- - Fix class comparisons
133
- - Update ChefZero API to work again
134
- - Use proper cookbook in the template_finder
135
- - Fix Ruby deprecations
136
- - Various documentation updates
243
+
244
+ - Fix class comparisons
245
+ - Update ChefZero API to work again
246
+ - Use proper cookbook in the template_finder
247
+ - Fix Ruby deprecations
248
+ - Various documentation updates
137
249
 
138
250
  ## 4.0.0 (June 2, 2014)
251
+
139
252
  BREAKING CHANGES:
140
- - **Upgraded to RSpec 3!** RSpec 3 brings many new API changes and syntaxes
141
- - **Bump minimum required Chef version to 11.12!** Without this change, Chef Zero will blow up
142
-
143
- BUG FIXES:
144
- - Gracefully fail if a resource does not report it's source line in the reporter
145
- - Pull the correct cookbook folder from the stack on Windows (88bfc6)
146
- - Cover resources in render_file matchers for reporting
147
- - Cover resources in link_to matchers for reporting
148
- - Cover resources in do_nothing matchers for reporting
149
- - Fix memory leak in LWRP Resource classes
150
- - Restore the original `cookbook_path` when using librarian-chef
151
- - Documentation fixes
152
- - Disable lazy loading of cached resources
153
- - Fix a bug that will happen in later Chef versions because FreeBSD is evil (13ff143)
154
- - Do not pass local file paths to `preferred_filename_on_disk_location`
253
+
254
+ - **Upgraded to RSpec 3!** RSpec 3 brings many new API changes and syntaxes
255
+ - **Bump minimum required Chef version to 11.12!** Without this change, Chef Zero will blow up
256
+
257
+ BUG FIXES:
258
+
259
+ - Gracefully fail if a resource does not report it's source line in the reporter
260
+ - Pull the correct cookbook folder from the stack on Windows (88bfc6)
261
+ - Cover resources in render_file matchers for reporting
262
+ - Cover resources in link_to matchers for reporting
263
+ - Cover resources in do_nothing matchers for reporting
264
+ - Fix memory leak in LWRP Resource classes
265
+ - Restore the original `cookbook_path` when using librarian-chef
266
+ - Documentation fixes
267
+ - Disable lazy loading of cached resources
268
+ - Fix a bug that will happen in later Chef versions because FreeBSD is evil (13ff143)
269
+ - Do not pass local file paths to `preferred_filename_on_disk_location`
155
270
 
156
271
  FEATURES:
157
- - Add runner methods for all the bash, csh, perl, etc resources
158
- - Upgraded fauxhai dependency and specs
159
- - Upgrade Chef Zero for multi-org support
272
+
273
+ - Add runner methods for all the bash, csh, perl, etc resources
274
+ - Upgraded fauxhai dependency and specs
275
+ - Upgrade Chef Zero for multi-org support
160
276
 
161
277
  IMPROVEMENTS:
162
- - Improved documentation around the `define_runner_method` method
163
- - Update badges to be all SVG
164
- - Test on Ruby 2.1
165
- - Use a randomly assigned port for Chef Zero
166
- - Remove references to `.stub` from documentation
167
278
 
279
+ - Improved documentation around the `define_runner_method` method
280
+ - Update badges to be all SVG
281
+ - Test on Ruby 2.1
282
+ - Use a randomly assigned port for Chef Zero
283
+ - Remove references to `.stub` from documentation
168
284
 
169
285
  ## 3.4.0 (March 16, 2014)
286
+
170
287
  BUG FIXES:
171
- - Restore Berkshelf 2 support (missing edge case)
172
- - Add negative failure message for subscribes/notifies matchers
288
+
289
+ - Restore Berkshelf 2 support (missing edge case)
290
+ - Add negative failure message for subscribes/notifies matchers
173
291
 
174
292
  FEATURES:
175
- - Added `do_nothing` matcher for asserting a resource performed no actions
293
+
294
+ - Added `do_nothing` matcher for asserting a resource performed no actions
176
295
 
177
296
  IMPROVEMENTS:
178
- - Increased spec coverage for matchers
179
- - Support RSpec matchers in `with_content`
297
+
298
+ - Increased spec coverage for matchers
299
+ - Support RSpec matchers in `with_content`
180
300
 
181
301
  ## 3.3.1 (March 11, 2014)
302
+
182
303
  BUG FIXES:
183
- - Various typographical fixes in the README
184
- - Remove unused JSON report
185
- - Restore coverage reporting for Berkshelf 2 users
186
- - Minor formatting changes for errors
304
+
305
+ - Various typographical fixes in the README
306
+ - Remove unused JSON report
307
+ - Restore coverage reporting for Berkshelf 2 users
308
+ - Minor formatting changes for errors
187
309
 
188
310
  IMPROVEMENTS:
189
- - Remove dependency on i18n and use native ERB instead
190
- - Vendor Berkshelf/Librarian in a "cookbooks" directory so we can shorten the pathname during coverage reporting
311
+
312
+ - Remove dependency on i18n and use native ERB instead
313
+ - Vendor Berkshelf/Librarian in a "cookbooks" directory so we can shorten the pathname during coverage reporting
191
314
 
192
315
  ## 3.3.0 (March 9, 2014)
316
+
193
317
  BUG FIXES:
194
- - Update documentation for setting `automatic` attributes
195
- - Update documentation for stubbing data_bags
196
- - Use a non-internal RSpec variable name for expecting exceptions
197
- - Fix the airity of the `stub_node` method
318
+
319
+ - Update documentation for setting `automatic` attributes
320
+ - Update documentation for stubbing data_bags
321
+ - Use a non-internal RSpec variable name for expecting exceptions
322
+ - Fix the airity of the `stub_node` method
198
323
 
199
324
  IMPROVEMENTS:
200
- - Better filtering protocols for resource coverage
325
+
326
+ - Better filtering protocols for resource coverage
201
327
 
202
328
  ## 3.2.0 (January 31, 2014)
329
+
203
330
  BUG FIXES:
204
- - Fix coverage calculation when there are no resources in the collection
205
- - Fix misplaced quote in matcher output
206
- - Include all files in generated gem
207
- - Ensure compatibility with Chef HEAD
331
+
332
+ - Fix coverage calculation when there are no resources in the collection
333
+ - Fix misplaced quote in matcher output
334
+ - Include all files in generated gem
335
+ - Ensure compatibility with Chef HEAD
208
336
 
209
337
  IMPROVEMENTS:
210
- - Test Ruby 2.1 on Travis
211
- - Miscellaneous README typos
212
- - Add `subscribe_to` matchers
213
- - Add documentation for the `with` matcher
214
- - Add support for passing a `node` object directly to the server `create_node` method
338
+
339
+ - Test Ruby 2.1 on Travis
340
+ - Miscellaneous README typos
341
+ - Add `subscribe_to` matchers
342
+ - Add documentation for the `with` matcher
343
+ - Add support for passing a `node` object directly to the server `create_node` method
215
344
 
216
345
  ## 3.1.4 (January 3, 2014)
346
+
217
347
  BUG FIXES:
218
- - Correctly expand the node's run_list in server mode
219
- - Actually package i18n translations with the cookbook
348
+
349
+ - Correctly expand the node's run_list in server mode
350
+ - Actually package i18n translations with the cookbook
220
351
 
221
352
  IMPROVEMENTS:
222
- - Document setting a node's role
223
- - Add examples and features for `stub_node`
353
+
354
+ - Document setting a node's role
355
+ - Add examples and features for `stub_node`
224
356
 
225
357
  ## 3.1.3 (January 2, 2014)
358
+
226
359
  BUG FIXES:
227
- - Fix broken deprecations module
228
- - Update a broken test ([@bknowles][])
360
+
361
+ - Fix broken deprecations module
362
+ - Update a broken test ([@bknowles])
229
363
 
230
364
  IMPROVEMENTS:
231
- - Better gem description on GitHub and Rubygems
232
- - Helper support for template rendering (Chef 11.4+) ([@geraud][])
365
+
366
+ - Better gem description on GitHub and Rubygems
367
+ - Helper support for template rendering (Chef 11.4+) ([@geraud])
233
368
 
234
369
  ## 3.1.2 (December 30, 2013)
370
+
235
371
  BUG FIXES:
236
- - Require i18n 0.6.9 or higher (but less than 1.0.0) ([#289](https://github.com/sethvargo/chefspec/issues/245))
372
+
373
+ - Require i18n 0.6.9 or higher (but less than 1.0.0) ([#289](https://github.com/sethvargo/chefspec/issues/245))
237
374
 
238
375
  ## 3.1.1 (December 29, 2013)
376
+
239
377
  BUG FIXES:
240
- - Handle duplicate resources in the coverage reporter
378
+
379
+ - Handle duplicate resources in the coverage reporter
241
380
 
242
381
  ## 3.1.0 (December 29, 2013)
382
+
243
383
  BUG FIXES:
244
- - Only remove existing LWRP resources and providers when a new one is encountered ([@student][])
245
- - Attempt to coerce dashes to underscores in LWRPs
246
- - Various documentation fixes and typos
384
+
385
+ - Only remove existing LWRP resources and providers when a new one is encountered ([@student])
386
+ - Attempt to coerce dashes to underscores in LWRPs
387
+ - Various documentation fixes and typos
247
388
 
248
389
  IMPROVEMENTS:
249
- - Don't include `deprecations` module by default
250
- - Add examples for stubbing commands across recipes
251
- - Yield a block after cookbooks are compiled but before they are converged ([@rteabeault][])
252
- - Add IRC Channel #chefspec
253
- - Raise a nice error when `cookbook_path` cannot be determined ([@ryotarai][])
390
+
391
+ - Don't include `deprecations` module by default
392
+ - Add examples for stubbing commands across recipes
393
+ - Yield a block after cookbooks are compiled but before they are converged ([@rteabeault])
394
+ - Add IRC Channel #chefspec
395
+ - Raise a nice error when `cookbook_path` cannot be determined ([@ryotarai])
254
396
 
255
397
  FEATURES:
256
- - Add support for Librarian ([@mlafeldt][])
257
- - Add Cacher module for caching runner results ([@sethvargo][] & [@DracoAter][])
258
- - Add Chef Zero (server) mode ([@sethvargo][])
259
- - Add basic resource reporting (Chef recipe code coverage) ([@sethvargo][])
260
- - Use i18n (internationalization) ([@sethvargo][])
398
+
399
+ - Add support for Librarian ([@mlafeldt])
400
+ - Add Cacher module for caching runner results ([@sethvargo] & [@DracoAter])
401
+ - Add Chef Zero (server) mode ([@sethvargo])
402
+ - Add basic resource reporting (Chef recipe code coverage) ([@sethvargo])
403
+ - Use i18n (internationalization) ([@sethvargo])
261
404
 
262
405
  ## 3.0.2 (November 6, 2013)
406
+
263
407
  BUG FIXES:
264
- - Update links to point at new repository location
265
- - Deleted relish docs to remove confusion
266
- - Bump fauxhai dependency to 2.0 (removing the HTTParty transitive dependency)
267
- - Convert resource names with dashes to underscores when stepping into them
408
+
409
+ - Update links to point at new repository location
410
+ - Deleted relish docs to remove confusion
411
+ - Bump fauxhai dependency to 2.0 (removing the HTTParty transitive dependency)
412
+ - Convert resource names with dashes to underscores when stepping into them
268
413
 
269
414
  IMPROVEMENTS:
270
- - Added a "what people are saying" section to the README - if you have something cool to say about ChefSpec, let me know!
271
- - Add a link to [`knife-spec`](https://github.com/sethvargo/knife-spec)
272
- - Test against Chef 11.8
273
- - New matcher: `have_state_attrs` for testing custom LWRP state attributes
274
- - Run tests in a sandboxed parent instead of tmp (makes Travis happier)
275
415
 
416
+ - Added a "what people are saying" section to the README - if you have something cool to say about ChefSpec, let me know!
417
+ - Add a link to [`knife-spec`](https://github.com/sethvargo/knife-spec)
418
+ - Test against Chef 11.8
419
+ - New matcher: `have_state_attrs` for testing custom LWRP state attributes
420
+ - Run tests in a sandboxed parent instead of tmp (makes Travis happier)
276
421
 
277
422
  ## 3.0.1 (October 22, 2013)
423
+
278
424
  BUG FIXES:
279
- - Fix an issue where LWRPs were not properly stepped into when `use_inline_resources` was specified ([#244](https://github.com/sethvargo/chefspec/issues/244))
280
- - Coerce `render_file` `@expected_content` to a string before asserting if content is included ([#243](https://github.com/sethvargo/chefspec/issues/243))
425
+
426
+ - Fix an issue where LWRPs were not properly stepped into when `use_inline_resources` was specified ([#244](https://github.com/sethvargo/chefspec/issues/244))
427
+ - Coerce `render_file` `@expected_content` to a string before asserting if content is included ([#243](https://github.com/sethvargo/chefspec/issues/243))
281
428
 
282
429
  IMPROVEMENTS:
283
- - Miscellaneous documentation fixes and additions ([#245](https://github.com/sethvargo/chefspec/issues/245), [#241](https://github.com/sethvargo/chefspec/issues/241), [#238](https://github.com/sethvargo/chefspec/issues/238))
284
430
 
431
+ - Miscellaneous documentation fixes and additions ([#245](https://github.com/sethvargo/chefspec/issues/245), [#241](https://github.com/sethvargo/chefspec/issues/241), [#238](https://github.com/sethvargo/chefspec/issues/238))
285
432
 
286
433
  ## 3.0.0 (October 20, 2013)
434
+
287
435
  Breaking:
288
- - Dropped support for Chef 9 & 10
289
- - Renamed `ChefSpec::ChefRunner` to `ChefSpec::Runner` to better reflect what happens in Chef Core. Using `ChefRunner` will throw deprecation errors for now and will be removed in a future release.
290
- - Removed MiniTest Chef Handler examples/matchers
291
- - No longer load default cookbook paths:
292
- - vendor/cookbooks
293
- - test/cookbooks
294
- - test/integration (test kitchen)
295
- - spec/cookbooks
296
- - Resource matchers all follow the pattern "(action)_(resource_name)". ChefSpec will warn you of these deprecations in 3.0. They will be removed in 4.0. However, some resources cannot be automatically converted - **these resources will raise a deprecation exception of `ChefSpec::NoConversionError`**. The following matchers have changed:
297
- - `execute_command` => `run_execute`
298
- - `set_service_to_start_on_boot` => `enable_service`
299
- - `create_file_with_content` => `render_file`
300
- - `execute_(script)` => `run_(script)`
301
- - `execute_ruby_block` => `run_ruby_block`
302
- - `install_package_at_version` => `install_package().with(version: '')`
303
- - `*_python_pip` => (removed - see "Packaging Custom LWRPs in the README")
304
- - Remove dependency on Erubis
305
- - Remove dependency on MiniTest Chef Handler
306
- - Remove development dependency on Cucumber
307
- - Remove development dependency on i18n
308
- - Remove development dependency on simplecov
309
- - Separate package matchers. In prior versions of ChefSpec, the `package` matcher would match on any kind of package and any kind of package action. However, some subclasses of the package resource do not support all actions. Each package provider now has it's own matcher with only the actions it supports. Prior specs that used the generic `package` matcher will no longer match on subclasses - you must use the specific subclass matcher.
310
- - Separate file/cookbook_file/template matchers. In prior versions of ChefSpec, the `file` matcher would match on `file`, `cookbook_file`, and `template`. This is not ideal because it doesn't verify the correct message was sent. Now, `file`, `cookbook_file`, and `template` matchers will _only_ match resources of that type. For generic file checking, please use the new `render_file` matcher.
311
- - Guards are now evaluated by default. If a shell guard is executed, it must first be stubbed with the `stub_command` macro.
312
- - `Runner#resources` converted from an Array to a Hash. This is to ensure that all resource actions are added (when multiple calls to run_action exist (#201)). This also drastically improves resource lookup times.
313
- - `Resource#actions` is no longer maniuplated. Instead, a new method `Resource#performed_actions` now keeps track of the actions taken on a resource (as well as the phase in which they were taken), preserving the original state of the resource.
436
+
437
+ - Dropped support for Chef 9 & 10
438
+ - Renamed `ChefSpec::ChefRunner` to `ChefSpec::Runner` to better reflect what happens in Chef Core. Using `ChefRunner` will throw deprecation errors for now and will be removed in a future release.
439
+ - Removed MiniTest Chef Handler examples/matchers
440
+ - No longer load default cookbook paths:
441
+
442
+ - vendor/cookbooks
443
+ - test/cookbooks
444
+ - test/integration (test kitchen)
445
+ - spec/cookbooks
446
+
447
+ - Resource matchers all follow the pattern "(action)_(resource_name)". ChefSpec will warn you of these deprecations in 3.0\. They will be removed in 4.0\. However, some resources cannot be automatically converted - **these resources will raise a deprecation exception of `ChefSpec::NoConversionError`**. The following matchers have changed:
448
+
449
+ - `execute_command` => `run_execute`
450
+ - `set_service_to_start_on_boot` => `enable_service`
451
+ - `create_file_with_content` => `render_file`
452
+ - `execute_(script)` => `run_(script)`
453
+ - `execute_ruby_block` => `run_ruby_block`
454
+ - `install_package_at_version` => `install_package().with(version: '')`
455
+ - `*_python_pip` => (removed - see "Packaging Custom LWRPs in the README")
456
+
457
+ - Remove dependency on Erubis
458
+
459
+ - Remove dependency on MiniTest Chef Handler
460
+
461
+ - Remove development dependency on Cucumber
462
+
463
+ - Remove development dependency on i18n
464
+
465
+ - Remove development dependency on simplecov
466
+
467
+ - Separate package matchers. In prior versions of ChefSpec, the `package` matcher would match on any kind of package and any kind of package action. However, some subclasses of the package resource do not support all actions. Each package provider now has it's own matcher with only the actions it supports. Prior specs that used the generic `package` matcher will no longer match on subclasses - you must use the specific subclass matcher.
468
+
469
+ - Separate file/cookbook_file/template matchers. In prior versions of ChefSpec, the `file` matcher would match on `file`, `cookbook_file`, and `template`. This is not ideal because it doesn't verify the correct message was sent. Now, `file`, `cookbook_file`, and `template` matchers will _only_ match resources of that type. For generic file checking, please use the new `render_file` matcher.
470
+
471
+ - Guards are now evaluated by default. If a shell guard is executed, it must first be stubbed with the `stub_command` macro.
472
+
473
+ - `Runner#resources` converted from an Array to a Hash. This is to ensure that all resource actions are added (when multiple calls to run_action exist (#201)). This also drastically improves resource lookup times.
474
+
475
+ - `Resource#actions` is no longer maniuplated. Instead, a new method `Resource#performed_actions` now keeps track of the actions taken on a resource (as well as the phase in which they were taken), preserving the original state of the resource.
314
476
 
315
477
  FEATURES:
316
- - Added a new `render_file` action to replace `create_file_with_content`. This matcher will render the contents of any file to a string and then optionally compare the result if given a `with` chainable.
317
- - All resources now accept a `with` chainable for matching specific resource attributes.
318
- - Windows attributes are now testable on non-Windows systems (like `inherits`)
319
- - Added `batch` resource matchers
320
- - Added `cookbook_file` resource matchers
321
- - Added `deploy` resource matchers
322
- - Added `erl_call` resource matchers
323
- - Added `git` resource matchers
324
- - Added `http_request` resource matchers
325
- - Added `ifconfig` resource matchers
326
- - Normalized `link` resource matchers
327
- - Added `log` resource matchers
328
- - Added `mdadm` resource matchers
329
- - Added `mount` resource matchers
330
- - Added `:immediate` and `:delayed` notification matchers
331
- - Added `ohai` resource matchers
332
- - Added `powershell_script` matchers (Chef 11.6+)
333
- - Added `registry_key` matchers
334
- - Added `remote_directory` matchers
335
- - Added `route` matchers
336
- - Added `subversion` matchers
337
- - Added `stub_command` macro (formerly on `ChefSpec::ChefRunner`) for stubbbing the results of shell commands. Because shell commands are evaluated by default, ChefSpec will raise an exception when encountering a shell command that has not been stubbed.
338
- - Added `stub_search` macro for easily stubbing `search` calls. Like shell commands, ChefSpec will raise an exception when encountering a `search` call that has not been stubbed.
339
- - Added `stub_data_bag` macro for easily stubbing `data_bag` calls. Like shell commands, ChefSpec will raise an exception when encountering a `data_bag` call that has not been stubbed.
340
- - Added `stub_data_bag_item` macro for easily stubbing` data_bag_item` calls. Like shell commands, ChefSpec will raise an exception when encountering a `data_bag_item` call that has not been stubbed.
341
- - Added `stub_node` helper for quickly generating a node object from Fauxhai data
342
- - Added `ChefSpec::Runner#apply` command to mimic the behavior of `chef-apply` (use with caution)
343
- - Share the `ChefSpec::Runner` object with the Node object
344
- - Add `chefspec/berkshelf` for easily integrating specs with Berkshelf (2 & 3)
345
- - Add `.at_compile_time` and `.at_converge_time` matchers for asserting which phase of the Chef run a resource should be run
478
+
479
+ - Added a new `render_file` action to replace `create_file_with_content`. This matcher will render the contents of any file to a string and then optionally compare the result if given a `with` chainable.
480
+ - All resources now accept a `with` chainable for matching specific resource attributes.
481
+ - Windows attributes are now testable on non-Windows systems (like `inherits`)
482
+ - Added `batch` resource matchers
483
+ - Added `cookbook_file` resource matchers
484
+ - Added `deploy` resource matchers
485
+ - Added `erl_call` resource matchers
486
+ - Added `git` resource matchers
487
+ - Added `http_request` resource matchers
488
+ - Added `ifconfig` resource matchers
489
+ - Normalized `link` resource matchers
490
+ - Added `log` resource matchers
491
+ - Added `mdadm` resource matchers
492
+ - Added `mount` resource matchers
493
+ - Added `:immediate` and `:delayed` notification matchers
494
+ - Added `ohai` resource matchers
495
+ - Added `powershell_script` matchers (Chef 11.6+)
496
+ - Added `registry_key` matchers
497
+ - Added `remote_directory` matchers
498
+ - Added `route` matchers
499
+ - Added `subversion` matchers
500
+ - Added `stub_command` macro (formerly on `ChefSpec::ChefRunner`) for stubbbing the results of shell commands. Because shell commands are evaluated by default, ChefSpec will raise an exception when encountering a shell command that has not been stubbed.
501
+ - Added `stub_search` macro for easily stubbing `search` calls. Like shell commands, ChefSpec will raise an exception when encountering a `search` call that has not been stubbed.
502
+ - Added `stub_data_bag` macro for easily stubbing `data_bag` calls. Like shell commands, ChefSpec will raise an exception when encountering a `data_bag` call that has not been stubbed.
503
+ - Added `stub_data_bag_item` macro for easily stubbing`data_bag_item` calls. Like shell commands, ChefSpec will raise an exception when encountering a `data_bag_item` call that has not been stubbed.
504
+ - Added `stub_node` helper for quickly generating a node object from Fauxhai data
505
+ - Added `ChefSpec::Runner#apply` command to mimic the behavior of `chef-apply` (use with caution)
506
+ - Share the `ChefSpec::Runner` object with the Node object
507
+ - Add `chefspec/berkshelf` for easily integrating specs with Berkshelf (2 & 3)
508
+ - Add `.at_compile_time` and `.at_converge_time` matchers for asserting which phase of the Chef run a resource should be run
346
509
 
347
510
  IMPROVEMENTS:
348
- - Move to inline documentation (Yard)
349
- - Implement InProcess Aruba testing for ultra-fast tests
350
- - Create "examples" directory for testing and demonstration
351
- - Unified all failure_messages_for_should
352
- - Use `shared_examples` for easily testing defined custom matchers
353
- - Infer the `cookbook_path` from the calling spec
354
- - Directly set node attributes with Fauxhai (formerly this was an O(n) operation)
355
- - Refactored ExpectExpectation to work without stubbing
356
- - Use Chef's `resource_collection` to identify resources instead of our own custom proxy
357
511
 
512
+ - Move to inline documentation (Yard)
513
+ - Implement InProcess Aruba testing for ultra-fast tests
514
+ - Create "examples" directory for testing and demonstration
515
+ - Unified all failure_messages_for_should
516
+ - Use `shared_examples` for easily testing defined custom matchers
517
+ - Infer the `cookbook_path` from the calling spec
518
+ - Directly set node attributes with Fauxhai (formerly this was an O(n) operation)
519
+ - Refactored ExpectExpectation to work without stubbing
520
+ - Use Chef's `resource_collection` to identify resources instead of our own custom proxy
358
521
 
359
522
  ## 2.0.1 (August 28, 2013)
360
523
 
361
524
  BUG FIXES:
362
525
 
363
- - Add missing second optional parameter to `Hash#respond_to?` monkey patch
526
+ - Add missing second optional parameter to `Hash#respond_to?` monkey patch
364
527
 
365
528
  FEATURES
366
529
 
367
- - Improve error message when using a regular express
368
- - Improve documentation for Python packages
530
+ - Improve error message when using a regular express
531
+ - Improve documentation for Python packages
369
532
 
370
533
  ## 2.0.0 (August 22, 2013)
371
534
 
372
535
  Breaking:
373
536
 
374
- - Remove support for REE ([@andrewgross][] for the CI)
537
+ - Remove support for REE ([@andrewgross] for the CI)
375
538
 
376
539
  BUG FIXES:
377
540
 
378
- - Better failure message for `create_remote_file` ([@tmatilai][])
379
- - Add `cookbook_file` as an accepted type to the `create_file` matchers ([@dafyddcrosby][])
380
- - Ensure formatter is only registered once ([@student][])
381
- - Signifant README updates ([@phoolish][])
382
- - Fix `described_recipe` helper (S.R.Garcia)
383
- - Refactor Chef 10/11 template rendering ([@sethvargo][])
384
- - Fix CI ([@sethvargo][])
385
- - Match File actions as an array ([@sethvargo][])
541
+ - Better failure message for `create_remote_file` ([@tmatilai])
542
+ - Add `cookbook_file` as an accepted type to the `create_file` matchers ([@dafyddcrosby])
543
+ - Ensure formatter is only registered once ([@student])
544
+ - Signifant README updates ([@phoolish])
545
+ - Fix `described_recipe` helper (S.R.Garcia)
546
+ - Refactor Chef 10/11 template rendering ([@sethvargo])
547
+ - Fix CI ([@sethvargo])
548
+ - Match File actions as an array ([@sethvargo])
386
549
 
387
550
  FEATURES:
388
551
 
389
- - Extend `ruby_block` matcher to accept regular expressions ([@ssimeonov][])
390
- - Add `create_remote_file_if_missing` matcher ([@jimhopp][])
391
- - Extend `execute` matcher to accept regular expressions ([@eliaslevy][])
392
- - Add ability to expect exceptions during a run ([@student][])
393
- - Add regular expression support for resource names ([@mapleoin][])
394
- - Add support for `python_pip` LWRP ([@mapleoin][])
552
+ - Extend `ruby_block` matcher to accept regular expressions ([@ssimeonov])
553
+ - Add `create_remote_file_if_missing` matcher ([@jimhopp])
554
+ - Extend `execute` matcher to accept regular expressions ([@eliaslevy])
555
+ - Add ability to expect exceptions during a run ([@student])
556
+ - Add regular expression support for resource names ([@mapleoin])
557
+ - Add support for `python_pip` LWRP ([@mapleoin])
395
558
 
396
559
  ## 1.3.1 (June 10, 2013)
397
560
 
398
561
  BUG FIXES:
399
562
 
400
- - Allow the user to override `cookbook_path` again
563
+ - Allow the user to override `cookbook_path` again
401
564
 
402
565
  ## 1.3.0 (June 6, 2013)
403
566
 
404
567
  FEATURES:
405
568
 
406
- - Added the ability to evaluate `only_if` and `not_if` conditional guards and
407
- support for stubbing shell guards (#142, #144).
408
- - New `described_recipe` and `described_cookbook` helpers to keep your specs
409
- DRY (#140). Thanks Andrey Chernih.
569
+ - Added the ability to evaluate `only_if` and `not_if` conditional guards and support for stubbing shell guards (#142, #144).
570
+ - New `described_recipe` and `described_cookbook` helpers to keep your specs DRY (#140). Thanks Andrey Chernih.
410
571
 
411
572
  BUG FIXES:
412
573
 
413
- - Ensure that Ohai plugin reloader works with ChefSpec (#141). Thanks Andrey
414
- Chernih.
574
+ - Ensure that Ohai plugin reloader works with ChefSpec (#141). Thanks Andrey Chernih.
415
575
 
416
576
  ## 1.2.0 (May 16, 2013)
417
577
 
418
578
  FEATURES:
419
579
 
420
- - Add support for partial files (@RanjibDey)
421
- - Automatically check certain directories for cookbooks (@sethvargo)
580
+ - Add support for partial files (@RanjibDey)
581
+ - Automatically check certain directories for cookbooks (@sethvargo)
422
582
 
423
583
  ## 1.1.0 (May 10, 2013)
424
584
 
425
585
  FEATURES:
426
586
 
427
- - Upgrade to newest version of fauxhai (@tmatilai)
428
- - Make `find_resource` a public method (@adamhjk)
429
- - Add path support (from fauxhai) (@RanjibDey)
430
- - Custom Chef formatter for ChefSpec (removes pesky output) (@sethvargo)
587
+ - Upgrade to newest version of fauxhai (@tmatilai)
588
+ - Make `find_resource` a public method (@adamhjk)
589
+ - Add path support (from fauxhai) (@RanjibDey)
590
+ - Custom Chef formatter for ChefSpec (removes pesky output) (@sethvargo)
431
591
 
432
592
  BUG FIXES:
433
593
 
434
- - Remove pesky output from Chef 11
594
+ - Remove pesky output from Chef 11
435
595
 
436
596
  ## 1.0.0 (April 22, 2013)
437
597
 
438
598
  FEATURES:
439
599
 
440
- - Add support for matching file content using Regular Expressions (@ketan)
441
- - Add support for `ruby_block` matcher (Andrey Vorobiev)
442
- - Use Fauxhai for node attributes (see 4529c10)
443
- - Moved `test` and `development` into gemspec for transparency
444
- - Improve message logging and testing (@tmatilai)
445
- - Chef 11 compatibility (still Chef 10 compatible)
446
- - Accept and document new RSpec "expect" syntax
447
- - Attribute matchers for various providers (@bjoernalbers)
448
- - Add execute_{bash,csh,perl,python,ruby}_script matchers ([@mlafeldt][])
449
- - Add group and user resource matchers (@gildegoma)
450
- - Add support for `yum_package` (Justin Witrick)
451
- - Add ISSUES.md
452
- - Add CONTRIBUTING.md
453
- - Relax gemspec constraints (@juliandunn)
454
- - Improve documentation and examples
455
-
456
- BUG FIXES:
457
-
458
- - Fix Rubygems/Bundler 2.0 compatibility issues
459
- - Upgrade to newest RSpec
460
- - Fix Chef 11 incompatibility
461
- - Various documentation fixes
600
+ - Add support for matching file content using Regular Expressions (@ketan)
601
+ - Add support for `ruby_block` matcher (Andrey Vorobiev)
602
+ - Use Fauxhai for node attributes (see 4529c10)
603
+ - Moved `test` and `development` into gemspec for transparency
604
+ - Improve message logging and testing (@tmatilai)
605
+ - Chef 11 compatibility (still Chef 10 compatible)
606
+ - Accept and document new RSpec "expect" syntax
607
+ - Attribute matchers for various providers (@bjoernalbers)
608
+ - Add execute_{bash,csh,perl,python,ruby}_script matchers ([@mlafeldt])
609
+ - Add group and user resource matchers (@gildegoma)
610
+ - Add support for `yum_package` (Justin Witrick)
611
+ - Add ISSUES.md
612
+ - Add CONTRIBUTING.md
613
+ - Relax gemspec constraints (@juliandunn)
614
+ - Improve documentation and examples
615
+
616
+ BUG FIXES:
617
+
618
+ - Fix Rubygems/Bundler 2.0 compatibility issues
619
+ - Upgrade to newest RSpec
620
+ - Fix Chef 11 incompatibility
621
+ - Various documentation fixes
462
622
 
463
623
  ## 0.9.0 (November 10, 2012)
464
624
 
465
625
  FEATURES:
466
626
 
467
- - Support added for the `user` resource (#6). Thanks Ranjib Dey.
468
- - Support for making assertions about notifications added (#49). Thanks to
469
- Ranjib Dey.
470
- - New `include_recipe` matcher added (#50). Thanks Ranjib Dey.
471
- - Support added for the Windows `env` resource (#51). Thanks Ranjib Dey.
472
- - Convenience methods for common resources added to `ChefRunner` (#51).
473
- Thanks Ranjib Dey.
474
- - Further resource convenience methods added (#60). Thanks to Ketan
475
- Padegaonkar.
476
- - Support for the `:disable` action added to the service resource (#67).
477
- Thanks to Chris Lundquist.
478
- - Add a matcher to assert that a service is not running on boot (#58). Thanks
479
- to Ketan Padegaonkar.
480
- - Support added for the `chef_gem` resource (#74). Thanks to Jim Hopp.
481
-
482
- BUG FIXES:
483
-
484
- - Avoid failure if template path is not writable (#48). Thanks to Augusto
485
- Becciu and Jim Hopp.
486
- - Style fix for the README (#55). Thanks Greg Karékinian.
487
- - Ensure notification assertions work where the resource name contains
488
- brackets (#57). Thanks Sean Nolen.
489
- - Unit tests updated to explicitly specify attribute precedence as required
490
- from Chef 11 (#70). Thanks Mathias Lafeldt.
491
- - Documentation added to the README for the `create_remote_file` matcher
492
- (#71). Thanks Mathias Lafeldt.
493
- - Clarify that `create_file_with_content` matches on partial content (#72).
494
- Thanks Mathias Lafeldt.
627
+ - Support added for the `user` resource (#6). Thanks Ranjib Dey.
628
+ - Support for making assertions about notifications added (#49). Thanks to Ranjib Dey.
629
+ - New `include_recipe` matcher added (#50). Thanks Ranjib Dey.
630
+ - Support added for the Windows `env` resource (#51). Thanks Ranjib Dey.
631
+ - Convenience methods for common resources added to `ChefRunner` (#51). Thanks Ranjib Dey.
632
+ - Further resource convenience methods added (#60). Thanks to Ketan Padegaonkar.
633
+ - Support for the `:disable` action added to the service resource (#67). Thanks to Chris Lundquist.
634
+ - Add a matcher to assert that a service is not running on boot (#58). Thanks to Ketan Padegaonkar.
635
+ - Support added for the `chef_gem` resource (#74). Thanks to Jim Hopp.
636
+
637
+ BUG FIXES:
638
+
639
+ - Avoid failure if template path is not writable (#48). Thanks to Augusto Becciu and Jim Hopp.
640
+ - Style fix for the README (#55). Thanks Greg Karékinian.
641
+ - Ensure notification assertions work where the resource name contains brackets (#57). Thanks Sean Nolen.
642
+ - Unit tests updated to explicitly specify attribute precedence as required from Chef 11 (#70). Thanks Mathias Lafeldt.
643
+ - Documentation added to the README for the `create_remote_file` matcher (#71). Thanks Mathias Lafeldt.
644
+ - Clarify that `create_file_with_content` matches on partial content (#72). Thanks Mathias Lafeldt.
495
645
 
496
646
  ## 0.8.0 (September 14, 2012)
497
647
 
498
648
  FEATURES:
499
649
 
500
- - LWRP support added (#40). You can now make assertions about the resources
501
- created by a provider by telling chefspec to [step into a provider
502
- implementation](https://github.com/sethvargo/chefspec/tree/v0.8.0#writing-examples-for-lwrps).
503
- Thanks to Augusto Becciu for implementing this feature.
504
- - Updated for compatibility with Chef 10.14. Thanks Augusto Becciu.
650
+ - LWRP support added (#40). You can now make assertions about the resources created by a provider by telling chefspec to [step into a provider implementation](https://github.com/sethvargo/chefspec/tree/v0.8.0#writing-examples-for-lwrps). Thanks to Augusto Becciu for implementing this feature.
651
+ - Updated for compatibility with Chef 10.14\. Thanks Augusto Becciu.
505
652
 
506
653
  BUG FIXES:
507
654
 
508
- - Template paths are no longer hard-coded to live under `default` (#32).
509
- Thanks Augusto Becciu.
655
+ - Template paths are no longer hard-coded to live under `default` (#32). Thanks Augusto Becciu.
510
656
 
511
657
  ## 0.7.0 (August 27, 2012)
512
658
 
513
659
  FEATURES:
514
660
 
515
- - Cron resource support added (#33). Thanks Alexander Tamoykin.
516
- - RSpec dependency
517
- [bumped to 2.11](https://github.com/rspec/rspec-core/blob/b8197262d143294bf849ab58d1586d24537965ab/Changelog.md)
518
- which has
519
- [named subject](http://blog.davidchelimsky.net/2012/05/13/spec-smell-explicit-use-of-subject/)
520
- support (#37). Thanks Doug Ireton.
661
+ - Cron resource support added (#33). Thanks Alexander Tamoykin.
662
+ - RSpec dependency [bumped to 2.11](https://github.com/rspec/rspec-core/blob/b8197262d143294bf849ab58d1586d24537965ab/Changelog.md) which has [named subject](http://blog.davidchelimsky.net/2012/05/13/spec-smell-explicit-use-of-subject/) support (#37). Thanks Doug Ireton.
521
663
 
522
664
  BUG FIXES:
523
665
 
524
- - Correctly infer the default `cookbook_path` on Windows (#38). Thanks Torben
525
- Knerr.
666
+ - Correctly infer the default `cookbook_path` on Windows (#38). Thanks Torben Knerr.
526
667
 
527
668
  ## 0.6.1 (June 21, 2012)
528
669
 
529
670
  FEATURES:
530
671
 
531
- - With the
532
- [release of Chef 10.12.0](http://www.opscode.com/blog/2012/06/19/chef-10-12-0-released/)
533
- the Chef versioning scheme has changed to make use of the major version
534
- field. The constraint on chef is now optimistic. Thanks to Robert J. Berger
535
- of Runa.com for flagging this issue (#28).
672
+ - With the [release of Chef 10.12.0](http://www.opscode.com/blog/2012/06/19/chef-10-12-0-released/) the Chef versioning scheme has changed to make use of the major version field. The constraint on chef is now optimistic. Thanks to Robert J. Berger of Runa.com for flagging this issue (#28).
536
673
 
537
674
  ## 0.6.0 (May 31, 2012)
538
675
 
539
676
  FEATURES:
540
677
 
541
- - Service matchers extended to add support for the `:nothing` and `:enabled`
542
- actions. Thanks to Steve Lum (#20).
543
- - Added mock value for `node['languages']` to prevent failure when loading
544
- cookbooks that expect this attribute to have been populated by OHAI. Thanks
545
- to Jim Hopp (#23).
546
- - Matchers added for the `link` resource. Thanks to James Burgess (#25).
547
- - Matchers added for the `remote_file` resource. Thanks to Matt Pruitt (#26).
678
+ - Service matchers extended to add support for the `:nothing` and `:enabled` actions. Thanks to Steve Lum (#20).
679
+ - Added mock value for `node['languages']` to prevent failure when loading cookbooks that expect this attribute to have been populated by OHAI. Thanks to Jim Hopp (#23).
680
+ - Matchers added for the `link` resource. Thanks to James Burgess (#25).
681
+ - Matchers added for the `remote_file` resource. Thanks to Matt Pruitt (#26).
548
682
 
549
683
  ## 0.5.0 (February 20, 2012)
550
684
 
551
685
  FEATURES:
552
686
 
553
- - Thanks to Chris Griego and Morgan Nelson for these improvements:
554
- - Support both arrays and raw symbols for actions in the file content matcher (#14).
555
- - Add support for cookbook_file resources (#14).
556
- - Support added for `gem_package` resources. Thanks to Jim Hopp from Lookout (#16).
687
+ - Thanks to Chris Griego and Morgan Nelson for these improvements:
688
+
689
+ - Support both arrays and raw symbols for actions in the file content matcher (#14).
690
+ - Add support for cookbook_file resources (#14).
691
+
692
+ - Support added for `gem_package` resources. Thanks to Jim Hopp from Lookout (#16).
557
693
 
558
694
  BUG FIXES:
559
695
 
560
- - Set the client_key to nil so that Chef::Search::Query.new doesn't raise (#14). Thanks Chris Griego and Morgan Nelson.
696
+ - Set the client_key to nil so that Chef::Search::Query.new doesn't raise (#14). Thanks Chris Griego and Morgan Nelson.
561
697
 
562
698
  ## 0.4.0 (November 14, 2011)
563
699
 
564
700
  FEATURES:
565
701
 
566
- - Ruby 1.9.3 is now supported.
567
- - The `create_file_with_content` matcher now matches on partial content (#13). This is an API behaviour change but
568
- sufficiently minor and unlikely to break existing specs that I'm not bumping the major version. Thanks Chris Griego
569
- and Morgan Nelson from getaroom.
702
+ - Ruby 1.9.3 is now supported.
703
+ - The `create_file_with_content` matcher now matches on partial content (#13). This is an API behaviour change but sufficiently minor and unlikely to break existing specs that I'm not bumping the major version. Thanks Chris Griego and Morgan Nelson from getaroom.
570
704
 
571
705
  BUG FIXES:
572
706
 
573
- - Fixed a bug in the `install_package_at_version` matcher where it would error if the package action was not
574
- explicitly specified (#13). Thanks Chris Griego and Morgan Nelson from getaroom.
707
+ - Fixed a bug in the `install_package_at_version` matcher where it would error if the package action was not explicitly specified (#13). Thanks Chris Griego and Morgan Nelson from getaroom.
575
708
 
576
709
  ## 0.3.0 (October 2, 2011)
577
710
 
578
711
  FEATURES:
579
712
 
580
- - [Added new matcher](https://www.relishapp.com/sethvargo/chefspec/docs/write-examples-for-templates) `create_file_with_content` for verifying Chef `template` resource generated content.
581
- - [Knife plugin](https://www.relishapp.com/sethvargo/chefspec/docs/generate-placeholder-examples) added to generate placeholder examples.
713
+ - [Added new matcher](https://www.relishapp.com/sethvargo/chefspec/docs/write-examples-for-templates) `create_file_with_content` for verifying Chef `template` resource generated content.
714
+ - [Knife plugin](https://www.relishapp.com/sethvargo/chefspec/docs/generate-placeholder-examples) added to generate placeholder examples.
582
715
 
583
716
  ## 0.2.1 (September 21, 2011)
717
+
584
718
  BUG FIXES:
585
719
 
586
- - Fixed typo in 0.2.0 botched release. Pro-tip: run your tests.
720
+ - Fixed typo in 0.2.0 botched release. Pro-tip: run your tests.
587
721
 
588
722
  ## 0.2.0 (September 21, 2011)
589
723
 
590
724
  FEATURES:
591
725
 
592
- - Significantly improved performance by not invoking OHAI.
593
- - ChefRunner constructor now accepts a block to set node attributes.
594
- - ChefRunner constructor now takes an options hash.
595
- - Converge now returns a reference to the ChefRunner to support calling converge in a let block.
726
+ - Significantly improved performance by not invoking OHAI.
727
+ - ChefRunner constructor now accepts a block to set node attributes.
728
+ - ChefRunner constructor now takes an options hash.
729
+ - Converge now returns a reference to the ChefRunner to support calling converge in a let block.
596
730
 
597
731
  BUG FIXES:
598
732
 
599
- - Removed LWRP redefinition warnings.
600
- - Reset run_list between calls to converge.
601
- - Readable to_s output for failed specs.
733
+ - Removed LWRP redefinition warnings.
734
+ - Reset run_list between calls to converge.
735
+ - Readable to_s output for failed specs.
602
736
 
603
737
  ## 0.1.0 (August 9, 2011)
604
738
 
605
739
  FEATURES:
606
740
 
607
- - Support for Chef 0.1.x (#2)
608
- - Support MRI 1.9.2 (#3)
741
+ - Support for Chef 0.1.x (#2)
742
+ - Support MRI 1.9.2 (#3)
609
743
 
610
744
  BUG FIXES:
611
745
 
612
- - Added specs.
746
+ - Added specs.
613
747
 
614
748
  ## 0.0.2 (July 31, 2011)
615
749
 
616
750
  BUG FIXES:
617
751
 
618
- - Corrected gem dependencies.
752
+ - Corrected gem dependencies.
619
753
 
620
754
  ## 0.0.1 (July 31, 2011)
621
755
 
622
756
  Initial version.
623
757
 
624
- - - -
625
- [@acrmp]: <https://github.com/acrmp> "Andrew Crump GitHub"
626
- [@andrewgross]: <https://github.com/andrewgross> "Andrew Gross's GitHub"
627
- [@bknowles]: <https://github.com/bknowles> "Brad Knowles's GitHub"
628
- [@dafyddcrosby]: <https://github.com/dafyddcrosby> "Dafydd Crosby's GitHub"
629
- [@DracoAter]: <https://github.com/DracoAter> "Juri Timošin's GitHub"
630
- [@eliaslevy]: <https://github.com/eliaslevy> "eliaslevy's GitHub"
631
- [@jimhopp]: <https://github.com/jimhopp> "Jim Hopp's GitHub"
632
- [@geraud]: <https://github.com/geraud> "Geraud Boyer's GitHub"
633
- [@mapleoin]: <https://github.com/mapleoin> "Ionuț Arțăriși's GitHub"
634
- [@mlafeldt]: <https://github.com/mlafeldt> "Mathias Lafeldt's GitHub"
635
- [@phoolish]: <https://github.com/phoolish> "phoolish's GitHub"
636
- [@ranjib]: <https://github.com/ranjib> "Ranjib Dey's GitHub"
637
- [@ryotarai]: <https://github.com/ryotarai> "Ryota Arai's GitHub"
638
- [@rteabeault]: <https://github.com/rteabeault> "rteabeault's GitHub"
639
- [@sethvargo]: <https://github.com/sethvargo> "Seth Vargo GitHub"
640
- [@ssimeonov]: <https://github.com/ssimeonov> "Simeon Simeonov's GitHub"
641
- [@student]: <https://github.com/student> "Nathan Zook's GitHub"
642
- [@tmatilai]: <https://github.com/tmatilai> "Teemu Matilainen's GitHub"
758
+ --------------------------------------------------------------------------------
759
+
760
+ [@acrmp]: https://github.com/acrmp "Andrew Crump GitHub"
761
+ [@andrewgross]: https://github.com/andrewgross "Andrew Gross's GitHub"
762
+ [@bknowles]: https://github.com/bknowles "Brad Knowles's GitHub"
763
+ [@dafyddcrosby]: https://github.com/dafyddcrosby "Dafydd Crosby's GitHub"
764
+ [@dracoater]: https://github.com/DracoAter "Juri Timošin's GitHub"
765
+ [@eliaslevy]: https://github.com/eliaslevy "eliaslevy's GitHub"
766
+ [@geraud]: https://github.com/geraud "Geraud Boyer's GitHub"
767
+ [@jimhopp]: https://github.com/jimhopp "Jim Hopp's GitHub"
768
+ [@mapleoin]: https://github.com/mapleoin "Ionuț Arțăriși's GitHub"
769
+ [@mlafeldt]: https://github.com/mlafeldt "Mathias Lafeldt's GitHub"
770
+ [@phoolish]: https://github.com/phoolish "phoolish's GitHub"
771
+ [@ranjib]: https://github.com/ranjib "Ranjib Dey's GitHub"
772
+ [@rteabeault]: https://github.com/rteabeault "rteabeault's GitHub"
773
+ [@ryotarai]: https://github.com/ryotarai "Ryota Arai's GitHub"
774
+ [@sethvargo]: https://github.com/sethvargo "Seth Vargo GitHub"
775
+ [@ssimeonov]: https://github.com/ssimeonov "Simeon Simeonov's GitHub"
776
+ [@student]: https://github.com/student "Nathan Zook's GitHub"
777
+ [@tmatilai]: https://github.com/tmatilai "Teemu Matilainen's GitHub"