chef 11.10.0.rc.0 → 11.10.0.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (401) hide show
  1. data/Rakefile +0 -75
  2. data/distro/common/html/_sources/ctl_chef_client.txt +36 -0
  3. data/distro/common/html/_sources/ctl_chef_server.txt +26 -0
  4. data/distro/common/html/_sources/ctl_chef_shell.txt +15 -0
  5. data/distro/common/html/_sources/ctl_chef_solo.txt +25 -0
  6. data/distro/common/html/_sources/index.txt +126 -0
  7. data/distro/common/html/_sources/knife.txt +74 -0
  8. data/distro/common/html/_sources/knife_bootstrap.txt +56 -0
  9. data/distro/common/html/_sources/knife_client.txt +151 -0
  10. data/distro/common/html/_sources/knife_common_options.txt +6 -0
  11. data/distro/common/html/_sources/knife_configure.txt +29 -0
  12. data/distro/common/html/_sources/knife_cookbook.txt +236 -0
  13. data/distro/common/html/_sources/knife_cookbook_site.txt +157 -0
  14. data/distro/common/html/_sources/knife_data_bag.txt +160 -0
  15. data/distro/common/html/_sources/knife_delete.txt +26 -0
  16. data/distro/common/html/_sources/knife_deps.txt +61 -0
  17. data/distro/common/html/_sources/knife_diff.txt +34 -0
  18. data/distro/common/html/_sources/knife_download.txt +44 -0
  19. data/distro/common/html/_sources/knife_edit.txt +26 -0
  20. data/distro/common/html/_sources/knife_environment.txt +158 -0
  21. data/distro/common/html/_sources/knife_exec.txt +47 -0
  22. data/distro/common/html/_sources/knife_index_rebuild.txt +21 -0
  23. data/distro/common/html/_sources/knife_list.txt +33 -0
  24. data/distro/common/html/_sources/knife_node.txt +250 -0
  25. data/distro/common/html/_sources/knife_raw.txt +35 -0
  26. data/distro/common/html/_sources/knife_recipe_list.txt +23 -0
  27. data/distro/common/html/_sources/knife_role.txt +157 -0
  28. data/distro/common/html/_sources/knife_search.txt +53 -0
  29. data/distro/common/html/_sources/knife_show.txt +27 -0
  30. data/distro/common/html/_sources/knife_ssh.txt +43 -0
  31. data/distro/common/html/_sources/knife_status.txt +37 -0
  32. data/distro/common/html/_sources/knife_tag.txt +69 -0
  33. data/distro/common/html/_sources/knife_upload.txt +49 -0
  34. data/distro/common/html/_sources/knife_user.txt +127 -0
  35. data/distro/common/html/_sources/knife_using.txt +43 -0
  36. data/distro/common/html/_sources/knife_xargs.txt +30 -0
  37. data/distro/common/html/_static/ajax-loader.gif +0 -0
  38. data/distro/common/html/_static/basic.css +540 -0
  39. data/distro/common/html/_static/chef.css +507 -0
  40. data/distro/common/html/_static/chef.ico +0 -0
  41. data/distro/common/html/_static/chef_html_logo.png +0 -0
  42. data/distro/common/html/_static/chef_logo.png +0 -0
  43. data/distro/common/html/_static/comment-bright.png +0 -0
  44. data/distro/common/html/_static/comment-close.png +0 -0
  45. data/distro/common/html/_static/comment.png +0 -0
  46. data/distro/common/html/_static/contents.png +0 -0
  47. data/distro/common/html/_static/doctools.js +247 -0
  48. data/distro/common/html/_static/down-pressed.png +0 -0
  49. data/distro/common/html/_static/down.png +0 -0
  50. data/distro/common/html/_static/file.png +0 -0
  51. data/distro/common/html/_static/guide.css +505 -0
  52. data/distro/common/html/_static/jquery.js +154 -0
  53. data/distro/common/html/_static/minus.png +0 -0
  54. data/distro/common/html/_static/navigation.png +0 -0
  55. data/distro/common/html/_static/plus.png +0 -0
  56. data/distro/common/html/_static/pygments.css +62 -0
  57. data/distro/common/html/_static/searchtools.js +560 -0
  58. data/distro/common/html/_static/underscore.js +23 -0
  59. data/distro/common/html/_static/up-pressed.png +0 -0
  60. data/distro/common/html/_static/up.png +0 -0
  61. data/distro/common/html/_static/websupport.js +808 -0
  62. data/distro/common/html/ctl_chef_client.html +219 -0
  63. data/distro/common/html/ctl_chef_server.html +111 -0
  64. data/distro/common/html/ctl_chef_shell.html +120 -0
  65. data/distro/common/html/ctl_chef_solo.html +144 -0
  66. data/distro/common/html/index.html +185 -0
  67. data/distro/common/html/knife.html +172 -0
  68. data/distro/common/html/knife_bootstrap.html +250 -0
  69. data/distro/common/html/knife_client.html +283 -0
  70. data/distro/common/html/knife_common_options.html +98 -0
  71. data/distro/common/html/knife_configure.html +107 -0
  72. data/distro/common/html/knife_cookbook.html +481 -0
  73. data/distro/common/html/knife_cookbook_site.html +372 -0
  74. data/distro/common/html/knife_data_bag.html +359 -0
  75. data/distro/common/html/knife_delete.html +95 -0
  76. data/distro/common/html/knife_deps.html +145 -0
  77. data/distro/common/html/knife_diff.html +125 -0
  78. data/distro/common/html/knife_download.html +147 -0
  79. data/distro/common/html/knife_edit.html +91 -0
  80. data/distro/common/html/knife_environment.html +328 -0
  81. data/distro/common/html/knife_exec.html +222 -0
  82. data/distro/common/html/knife_index_rebuild.html +85 -0
  83. data/distro/common/html/knife_list.html +116 -0
  84. data/distro/common/html/knife_node.html +450 -0
  85. data/distro/common/html/knife_raw.html +112 -0
  86. data/distro/common/html/knife_recipe_list.html +93 -0
  87. data/distro/common/html/knife_role.html +295 -0
  88. data/distro/common/html/knife_search.html +204 -0
  89. data/distro/common/html/knife_show.html +106 -0
  90. data/distro/common/html/knife_ssh.html +179 -0
  91. data/distro/common/html/knife_status.html +142 -0
  92. data/distro/common/html/knife_tag.html +140 -0
  93. data/distro/common/html/knife_upload.html +155 -0
  94. data/distro/common/html/knife_user.html +244 -0
  95. data/distro/common/html/knife_using.html +211 -0
  96. data/distro/common/html/knife_xargs.html +115 -0
  97. data/distro/common/html/objects.inv +0 -0
  98. data/distro/common/html/search.html +84 -0
  99. data/distro/common/html/searchindex.js +1 -0
  100. data/distro/common/man/man1/chef-shell.1 +5 -5
  101. data/distro/common/man/man1/knife-bootstrap.1 +6 -9
  102. data/distro/common/man/man1/knife-client.1 +1 -9
  103. data/distro/common/man/man1/knife-configure.1 +10 -6
  104. data/distro/common/man/man1/knife-cookbook-site.1 +1 -9
  105. data/distro/common/man/man1/knife-cookbook.1 +11 -21
  106. data/distro/common/man/man1/knife-data-bag.1 +8 -22
  107. data/distro/common/man/man1/knife-delete.1 +1 -1
  108. data/distro/common/man/man1/knife-deps.1 +4 -12
  109. data/distro/common/man/man1/knife-diff.1 +1 -1
  110. data/distro/common/man/man1/knife-download.1 +2 -2
  111. data/distro/common/man/man1/knife-edit.1 +1 -1
  112. data/distro/common/man/man1/knife-environment.1 +108 -9
  113. data/distro/common/man/man1/knife-exec.1 +1 -15
  114. data/distro/common/man/man1/knife-index-rebuild.1 +1 -1
  115. data/distro/common/man/man1/knife-list.1 +1 -1
  116. data/distro/common/man/man1/knife-node.1 +3 -13
  117. data/distro/common/man/man1/knife-raw.1 +1 -1
  118. data/distro/common/man/man1/knife-recipe-list.1 +1 -1
  119. data/distro/common/man/man1/knife-role.1 +2 -12
  120. data/distro/common/man/man1/knife-search.1 +5 -5
  121. data/distro/common/man/man1/knife-show.1 +1 -3
  122. data/distro/common/man/man1/knife-ssh.1 +1 -5
  123. data/distro/common/man/man1/knife-status.1 +1 -1
  124. data/distro/common/man/man1/knife-tag.1 +1 -9
  125. data/distro/common/man/man1/knife-upload.1 +7 -9
  126. data/distro/common/man/man1/knife-user.1 +3 -17
  127. data/distro/common/man/man1/knife-xargs.1 +1 -3
  128. data/distro/common/man/man8/chef-client.8 +18 -18
  129. data/distro/common/man/man8/chef-solo.8 +12 -6
  130. data/lib/chef/client.rb +9 -5
  131. data/lib/chef/cookbook_uploader.rb +1 -1
  132. data/lib/chef/dsl/recipe.rb +119 -38
  133. data/lib/chef/exceptions.rb +4 -0
  134. data/lib/chef/policy_builder/expand_node_object.rb +11 -4
  135. data/lib/chef/policy_builder/policyfile.rb +7 -1
  136. data/lib/chef/provider/file.rb +1 -0
  137. data/lib/chef/resource_platform_map.rb +1 -1
  138. data/lib/chef/resource_reporter.rb +2 -2
  139. data/lib/chef/version.rb +1 -1
  140. data/spec/functional/knife/cookbook_delete_spec.rb +9 -9
  141. data/spec/functional/knife/ssh_spec.rb +1 -1
  142. data/spec/functional/resource/link_spec.rb +6 -6
  143. data/spec/functional/resource/registry_spec.rb +7 -7
  144. data/spec/functional/run_lock_spec.rb +1 -1
  145. data/spec/integration/knife/download_spec.rb +1 -1
  146. data/spec/integration/solo/solo_spec.rb +1 -1
  147. data/spec/spec_helper.rb +0 -1
  148. data/spec/stress/win32/file_spec.rb +6 -0
  149. data/spec/support/lib/chef/resource/zen_master.rb +1 -1
  150. data/spec/support/mock/platform.rb +1 -1
  151. data/spec/support/shared/functional/file_resource.rb +0 -2
  152. data/spec/support/shared/functional/securable_resource.rb +2 -2
  153. data/spec/support/shared/unit/api_error_inspector.rb +7 -7
  154. data/spec/support/shared/unit/provider/file.rb +47 -8
  155. data/spec/support/shared/unit/provider/useradd_based_user_provider.rb +23 -23
  156. data/spec/unit/api_client/registration_spec.rb +5 -5
  157. data/spec/unit/api_client_spec.rb +2 -2
  158. data/spec/unit/application/apply.rb +6 -6
  159. data/spec/unit/application/client_spec.rb +6 -6
  160. data/spec/unit/application/knife_spec.rb +5 -5
  161. data/spec/unit/application/solo_spec.rb +13 -13
  162. data/spec/unit/application_spec.rb +19 -19
  163. data/spec/unit/checksum/storage/filesystem_spec.rb +2 -2
  164. data/spec/unit/client_spec.rb +23 -23
  165. data/spec/unit/config_spec.rb +4 -4
  166. data/spec/unit/cookbook/metadata_spec.rb +22 -22
  167. data/spec/unit/cookbook/synchronizer_spec.rb +17 -17
  168. data/spec/unit/daemon_spec.rb +21 -22
  169. data/spec/unit/data_bag_item_spec.rb +8 -8
  170. data/spec/unit/data_bag_spec.rb +6 -6
  171. data/spec/unit/deprecation_spec.rb +1 -1
  172. data/spec/unit/dsl/data_query_spec.rb +1 -1
  173. data/spec/unit/environment_spec.rb +5 -5
  174. data/spec/unit/file_access_control_spec.rb +5 -5
  175. data/spec/unit/file_cache_spec.rb +1 -1
  176. data/spec/unit/file_content_management/deploy/mv_unix_spec.rb +1 -1
  177. data/spec/unit/file_content_management/deploy/mv_windows_spec.rb +12 -12
  178. data/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb +4 -4
  179. data/spec/unit/formatters/error_inspectors/cookbook_resolve_error_inspector_spec.rb +4 -4
  180. data/spec/unit/formatters/error_inspectors/cookbook_sync_error_inspector_spec.rb +1 -1
  181. data/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb +6 -6
  182. data/spec/unit/formatters/error_inspectors/run_list_expansion_error_inspector_spec.rb +4 -4
  183. data/spec/unit/handler/json_file_spec.rb +1 -1
  184. data/spec/unit/handler_spec.rb +3 -3
  185. data/spec/unit/knife/bootstrap_spec.rb +17 -17
  186. data/spec/unit/knife/client_bulk_delete_spec.rb +4 -4
  187. data/spec/unit/knife/client_create_spec.rb +7 -7
  188. data/spec/unit/knife/client_reregister_spec.rb +2 -2
  189. data/spec/unit/knife/client_show_spec.rb +1 -1
  190. data/spec/unit/knife/config_file_selection_spec.rb +4 -4
  191. data/spec/unit/knife/configure_client_spec.rb +4 -4
  192. data/spec/unit/knife/configure_spec.rb +16 -16
  193. data/spec/unit/knife/cookbook_bulk_delete_spec.rb +10 -10
  194. data/spec/unit/knife/cookbook_create_spec.rb +5 -5
  195. data/spec/unit/knife/cookbook_delete_spec.rb +6 -6
  196. data/spec/unit/knife/cookbook_download_spec.rb +10 -10
  197. data/spec/unit/knife/cookbook_list_spec.rb +3 -3
  198. data/spec/unit/knife/cookbook_metadata_from_file_spec.rb +2 -2
  199. data/spec/unit/knife/cookbook_metadata_spec.rb +8 -8
  200. data/spec/unit/knife/cookbook_show_spec.rb +4 -4
  201. data/spec/unit/knife/cookbook_site_download_spec.rb +3 -3
  202. data/spec/unit/knife/cookbook_site_install_spec.rb +8 -8
  203. data/spec/unit/knife/cookbook_site_share_spec.rb +22 -22
  204. data/spec/unit/knife/cookbook_site_unshare_spec.rb +8 -8
  205. data/spec/unit/knife/cookbook_test_spec.rb +7 -7
  206. data/spec/unit/knife/cookbook_upload_spec.rb +20 -20
  207. data/spec/unit/knife/core/cookbook_scm_repo_spec.rb +6 -6
  208. data/spec/unit/knife/core/object_loader_spec.rb +1 -1
  209. data/spec/unit/knife/core/ui_spec.rb +19 -21
  210. data/spec/unit/knife/data_bag_create_spec.rb +4 -4
  211. data/spec/unit/knife/data_bag_edit_spec.rb +7 -7
  212. data/spec/unit/knife/data_bag_from_file_spec.rb +15 -15
  213. data/spec/unit/knife/data_bag_show_spec.rb +5 -5
  214. data/spec/unit/knife/environment_create_spec.rb +6 -6
  215. data/spec/unit/knife/environment_delete_spec.rb +6 -6
  216. data/spec/unit/knife/environment_edit_spec.rb +5 -5
  217. data/spec/unit/knife/environment_from_file_spec.rb +7 -7
  218. data/spec/unit/knife/environment_list_spec.rb +4 -4
  219. data/spec/unit/knife/environment_show_spec.rb +4 -4
  220. data/spec/unit/knife/index_rebuild_spec.rb +2 -2
  221. data/spec/unit/knife/knife_help.rb +11 -11
  222. data/spec/unit/knife/node_bulk_delete_spec.rb +4 -4
  223. data/spec/unit/knife/node_delete_spec.rb +5 -5
  224. data/spec/unit/knife/node_edit_spec.rb +2 -2
  225. data/spec/unit/knife/node_from_file_spec.rb +5 -5
  226. data/spec/unit/knife/node_list_spec.rb +3 -3
  227. data/spec/unit/knife/node_run_list_add_spec.rb +3 -3
  228. data/spec/unit/knife/node_run_list_remove_spec.rb +4 -4
  229. data/spec/unit/knife/node_run_list_set_spec.rb +5 -5
  230. data/spec/unit/knife/node_show_spec.rb +2 -2
  231. data/spec/unit/knife/role_bulk_delete_spec.rb +4 -4
  232. data/spec/unit/knife/role_create_spec.rb +5 -5
  233. data/spec/unit/knife/role_delete_spec.rb +5 -5
  234. data/spec/unit/knife/role_edit_spec.rb +5 -5
  235. data/spec/unit/knife/role_from_file_spec.rb +5 -5
  236. data/spec/unit/knife/role_list_spec.rb +2 -2
  237. data/spec/unit/knife/ssh_spec.rb +6 -6
  238. data/spec/unit/knife/status_spec.rb +4 -4
  239. data/spec/unit/knife/tag_create_spec.rb +3 -3
  240. data/spec/unit/knife/tag_delete_spec.rb +3 -3
  241. data/spec/unit/knife/tag_list_spec.rb +2 -2
  242. data/spec/unit/knife/user_create_spec.rb +7 -7
  243. data/spec/unit/knife/user_reregister_spec.rb +3 -3
  244. data/spec/unit/knife/user_show_spec.rb +1 -1
  245. data/spec/unit/knife_spec.rb +29 -29
  246. data/spec/unit/lwrp_spec.rb +2 -2
  247. data/spec/unit/mixin/checksum_spec.rb +2 -2
  248. data/spec/unit/mixin/command_spec.rb +1 -1
  249. data/spec/unit/mixin/enforce_ownership_and_permissions_spec.rb +4 -4
  250. data/spec/unit/mixin/params_validate_spec.rb +17 -17
  251. data/spec/unit/mixin/path_sanity_spec.rb +8 -8
  252. data/spec/unit/mixin/securable_spec.rb +87 -87
  253. data/spec/unit/mixin/shell_out_spec.rb +1 -1
  254. data/spec/unit/mixin/template_spec.rb +2 -2
  255. data/spec/unit/node/attribute_spec.rb +3 -3
  256. data/spec/unit/node_spec.rb +12 -12
  257. data/spec/unit/platform_spec.rb +1 -1
  258. data/spec/unit/policy_builder/expand_node_object_spec.rb +16 -0
  259. data/spec/unit/policy_builder/policyfile_spec.rb +4 -0
  260. data/spec/unit/provider/breakpoint_spec.rb +8 -8
  261. data/spec/unit/provider/cookbook_file/content_spec.rb +4 -4
  262. data/spec/unit/provider/cookbook_file_spec.rb +1 -1
  263. data/spec/unit/provider/cron/unix_spec.rb +11 -11
  264. data/spec/unit/provider/cron_spec.rb +40 -40
  265. data/spec/unit/provider/deploy/revision_spec.rb +11 -12
  266. data/spec/unit/provider/deploy/timestamped_spec.rb +3 -3
  267. data/spec/unit/provider/deploy_spec.rb +50 -50
  268. data/spec/unit/provider/directory_spec.rb +18 -18
  269. data/spec/unit/provider/env_spec.rb +15 -15
  270. data/spec/unit/provider/erl_call_spec.rb +1 -1
  271. data/spec/unit/provider/execute_spec.rb +5 -5
  272. data/spec/unit/provider/file/content_spec.rb +5 -5
  273. data/spec/unit/provider/file_spec.rb +1 -1
  274. data/spec/unit/provider/git_spec.rb +47 -47
  275. data/spec/unit/provider/group/dscl_spec.rb +16 -15
  276. data/spec/unit/provider/group/gpasswd_spec.rb +6 -5
  277. data/spec/unit/provider/group/groupadd_spec.rb +10 -10
  278. data/spec/unit/provider/group/groupmod_spec.rb +3 -3
  279. data/spec/unit/provider/group/pw_spec.rb +9 -8
  280. data/spec/unit/provider/group/usermod_spec.rb +13 -12
  281. data/spec/unit/provider/group/windows_spec.rb +9 -9
  282. data/spec/unit/provider/group_spec.rb +31 -31
  283. data/spec/unit/provider/http_request_spec.rb +3 -3
  284. data/spec/unit/provider/ifconfig/aix_spec.rb +7 -7
  285. data/spec/unit/provider/ifconfig/debian_spec.rb +3 -3
  286. data/spec/unit/provider/ifconfig/redhat_spec.rb +5 -5
  287. data/spec/unit/provider/ifconfig_spec.rb +13 -13
  288. data/spec/unit/provider/link_spec.rb +33 -33
  289. data/spec/unit/provider/mdadm_spec.rb +4 -4
  290. data/spec/unit/provider/mount/aix_spec.rb +5 -5
  291. data/spec/unit/provider/mount/mount_spec.rb +49 -50
  292. data/spec/unit/provider/mount/windows_spec.rb +18 -18
  293. data/spec/unit/provider/mount_spec.rb +12 -12
  294. data/spec/unit/provider/ohai_spec.rb +6 -6
  295. data/spec/unit/provider/package/aix_spec.rb +14 -14
  296. data/spec/unit/provider/package/apt_spec.rb +10 -10
  297. data/spec/unit/provider/package/dpkg_spec.rb +13 -13
  298. data/spec/unit/provider/package/easy_install_spec.rb +6 -6
  299. data/spec/unit/provider/package/freebsd_spec.rb +29 -29
  300. data/spec/unit/provider/package/ips_spec.rb +4 -4
  301. data/spec/unit/provider/package/macports_spec.rb +6 -6
  302. data/spec/unit/provider/package/pacman_spec.rb +17 -17
  303. data/spec/unit/provider/package/portage_spec.rb +18 -18
  304. data/spec/unit/provider/package/rpm_spec.rb +7 -7
  305. data/spec/unit/provider/package/rubygems_spec.rb +31 -31
  306. data/spec/unit/provider/package/smartos_spec.rb +4 -4
  307. data/spec/unit/provider/package/solaris_spec.rb +15 -15
  308. data/spec/unit/provider/package/yum_spec.rb +100 -100
  309. data/spec/unit/provider/package/zypper_spec.rb +10 -10
  310. data/spec/unit/provider/package_spec.rb +21 -21
  311. data/spec/unit/provider/registry_key_spec.rb +2 -2
  312. data/spec/unit/provider/remote_file/content_spec.rb +31 -31
  313. data/spec/unit/provider/remote_file/fetcher_spec.rb +8 -8
  314. data/spec/unit/provider/remote_file/ftp_spec.rb +10 -10
  315. data/spec/unit/provider/remote_file/http_spec.rb +4 -4
  316. data/spec/unit/provider/remote_file/local_file_spec.rb +2 -2
  317. data/spec/unit/provider/remote_file_spec.rb +1 -1
  318. data/spec/unit/provider/route_spec.rb +23 -23
  319. data/spec/unit/provider/script_spec.rb +5 -5
  320. data/spec/unit/provider/service/arch_service_spec.rb +41 -41
  321. data/spec/unit/provider/service/debian_service_spec.rb +23 -23
  322. data/spec/unit/provider/service/freebsd_service_spec.rb +33 -33
  323. data/spec/unit/provider/service/gentoo_service_spec.rb +16 -16
  324. data/spec/unit/provider/service/init_service_spec.rb +13 -13
  325. data/spec/unit/provider/service/insserv_service_spec.rb +4 -4
  326. data/spec/unit/provider/service/invokercd_service_spec.rb +12 -12
  327. data/spec/unit/provider/service/macosx_spec.rb +20 -20
  328. data/spec/unit/provider/service/redhat_spec.rb +15 -15
  329. data/spec/unit/provider/service/simple_service_spec.rb +9 -9
  330. data/spec/unit/provider/service/solaris_smf_service_spec.rb +13 -13
  331. data/spec/unit/provider/service/systemd_service_spec.rb +28 -28
  332. data/spec/unit/provider/service/upstart_service_spec.rb +41 -41
  333. data/spec/unit/provider/service/windows_spec.rb +37 -37
  334. data/spec/unit/provider/service_spec.rb +9 -9
  335. data/spec/unit/provider/subversion_spec.rb +36 -36
  336. data/spec/unit/provider/template/content_spec.rb +8 -8
  337. data/spec/unit/provider/template_spec.rb +1 -1
  338. data/spec/unit/provider/user/dscl_spec.rb +9 -9
  339. data/spec/unit/provider/user/pw_spec.rb +20 -20
  340. data/spec/unit/provider/user/solaris_spec.rb +5 -5
  341. data/spec/unit/provider/user/windows_spec.rb +8 -8
  342. data/spec/unit/provider/user_spec.rb +34 -34
  343. data/spec/unit/provider_spec.rb +3 -3
  344. data/spec/unit/recipe_spec.rb +79 -4
  345. data/spec/unit/registry_helper_spec.rb +2 -2
  346. data/spec/unit/resource/cron_spec.rb +2 -2
  347. data/spec/unit/resource/directory_spec.rb +5 -5
  348. data/spec/unit/resource/env_spec.rb +2 -2
  349. data/spec/unit/resource/erl_call_spec.rb +1 -1
  350. data/spec/unit/resource/file_spec.rb +8 -8
  351. data/spec/unit/resource/group_spec.rb +3 -3
  352. data/spec/unit/resource/link_spec.rb +8 -8
  353. data/spec/unit/resource/mdadm_spec.rb +3 -3
  354. data/spec/unit/resource/mount_spec.rb +3 -3
  355. data/spec/unit/resource/route_spec.rb +2 -2
  356. data/spec/unit/resource/user_spec.rb +2 -2
  357. data/spec/unit/resource/yum_package_spec.rb +2 -2
  358. data/spec/unit/resource_collection_spec.rb +1 -1
  359. data/spec/unit/resource_definition_spec.rb +2 -2
  360. data/spec/unit/resource_reporter_spec.rb +71 -16
  361. data/spec/unit/resource_spec.rb +3 -3
  362. data/spec/unit/rest/auth_credentials_spec.rb +2 -2
  363. data/spec/unit/rest_spec.rb +3 -40
  364. data/spec/unit/run_list/run_list_expansion_spec.rb +3 -3
  365. data/spec/unit/run_list_spec.rb +9 -9
  366. data/spec/unit/run_status_spec.rb +1 -1
  367. data/spec/unit/runner_spec.rb +8 -8
  368. data/spec/unit/scan_access_control_spec.rb +3 -3
  369. data/spec/unit/search/query_spec.rb +7 -7
  370. data/spec/unit/shell/model_wrapper_spec.rb +2 -2
  371. data/spec/unit/shell/shell_ext_spec.rb +15 -15
  372. data/spec/unit/shell/shell_session_spec.rb +9 -9
  373. data/spec/unit/shell_spec.rb +1 -2
  374. data/spec/unit/user_spec.rb +4 -4
  375. data/spec/unit/util/backup_spec.rb +1 -1
  376. data/spec/unit/util/selinux_spec.rb +7 -7
  377. metadata +106 -51
  378. data/distro/common/html/chef-client.8.html +0 -145
  379. data/distro/common/html/chef-expander.8.html +0 -164
  380. data/distro/common/html/chef-expanderctl.8.html +0 -146
  381. data/distro/common/html/chef-server-webui.8.html +0 -185
  382. data/distro/common/html/chef-server.8.html +0 -182
  383. data/distro/common/html/chef-shell.1.html +0 -286
  384. data/distro/common/html/chef-solo.8.html +0 -185
  385. data/distro/common/html/chef-solr.8.html +0 -165
  386. data/distro/common/html/knife-bootstrap.1.html +0 -241
  387. data/distro/common/html/knife-client.1.html +0 -219
  388. data/distro/common/html/knife-configure.1.html +0 -170
  389. data/distro/common/html/knife-cookbook-site.1.html +0 -241
  390. data/distro/common/html/knife-cookbook.1.html +0 -381
  391. data/distro/common/html/knife-data-bag.1.html +0 -235
  392. data/distro/common/html/knife-environment.1.html +0 -265
  393. data/distro/common/html/knife-exec.1.html +0 -134
  394. data/distro/common/html/knife-index.1.html +0 -125
  395. data/distro/common/html/knife-node.1.html +0 -250
  396. data/distro/common/html/knife-role.1.html +0 -200
  397. data/distro/common/html/knife-search.1.html +0 -288
  398. data/distro/common/html/knife-ssh.1.html +0 -156
  399. data/distro/common/html/knife-status.1.html +0 -128
  400. data/distro/common/html/knife-tag.1.html +0 -137
  401. data/distro/common/html/knife.1.html +0 -315
@@ -189,8 +189,8 @@ describe Chef::ApiClient do
189
189
 
190
190
  describe "when requesting a new key" do
191
191
  before do
192
- @http_client = mock("Chef::REST mock")
193
- Chef::REST.stub!(:new).and_return(@http_client)
192
+ @http_client = double("Chef::REST mock")
193
+ Chef::REST.stub(:new).and_return(@http_client)
194
194
  end
195
195
 
196
196
  context "and the client does not exist on the server" do
@@ -21,7 +21,7 @@ describe Chef::Application::Apply do
21
21
 
22
22
  before do
23
23
  @app = Chef::Application::Recipe.new
24
- @app.stub!(:configure_logging).and_return(true)
24
+ @app.stub(:configure_logging).and_return(true)
25
25
  @recipe_text = "package 'nyancat'"
26
26
  Chef::Config[:solo] = true
27
27
  end
@@ -36,10 +36,10 @@ describe Chef::Application::Apply do
36
36
  before do
37
37
  @recipe_file_name = "foo.rb"
38
38
  @recipe_path = File.expand_path("foo.rb")
39
- @recipe_file = mock("Tempfile (mock)", :read => @recipe_text)
40
- @app.stub!(:open).with(@recipe_path).and_return(@recipe_file)
41
- File.stub!(:exist?).with("foo.rb").and_return(true)
42
- Chef::Application.stub!(:fatal!).and_return(true)
39
+ @recipe_file = double("Tempfile (mock)", :read => @recipe_text)
40
+ @app.stub(:open).with(@recipe_path).and_return(@recipe_file)
41
+ File.stub(:exist?).with("foo.rb").and_return(true)
42
+ Chef::Application.stub(:fatal!).and_return(true)
43
43
  end
44
44
  it "should read text properly" do
45
45
  @app.read_recipe_file(@recipe_file_name)[0].should == @recipe_text
@@ -49,7 +49,7 @@ describe Chef::Application::Apply do
49
49
  end
50
50
  describe "when recipe doesn't exist" do
51
51
  before do
52
- File.stub!(:exist?).with(@recipe_file_name).and_return(false)
52
+ File.stub(:exist?).with(@recipe_file_name).and_return(false)
53
53
  end
54
54
  it "should raise a fatal" do
55
55
  Chef::Application.should_receive(:fatal!)
@@ -23,9 +23,9 @@ describe Chef::Application::Client, "reconfigure" do
23
23
  ARGV.clear
24
24
 
25
25
  @app = Chef::Application::Client.new
26
- @app.stub!(:configure_opt_parser).and_return(true)
27
- @app.stub!(:configure_chef).and_return(true)
28
- @app.stub!(:configure_logging).and_return(true)
26
+ @app.stub(:configure_opt_parser).and_return(true)
27
+ @app.stub(:configure_chef).and_return(true)
28
+ @app.stub(:configure_logging).and_return(true)
29
29
  @app.cli_arguments = []
30
30
  Chef::Config[:interval] = 10
31
31
 
@@ -91,9 +91,9 @@ describe Chef::Application::Client, "setup_application" do
91
91
  before do
92
92
  @app = Chef::Application::Client.new
93
93
  # this is all stuff the reconfigure method needs
94
- @app.stub!(:configure_opt_parser).and_return(true)
95
- @app.stub!(:configure_chef).and_return(true)
96
- @app.stub!(:configure_logging).and_return(true)
94
+ @app.stub(:configure_opt_parser).and_return(true)
95
+ @app.stub(:configure_chef).and_return(true)
96
+ @app.stub(:configure_logging).and_return(true)
97
97
  end
98
98
 
99
99
  it "should change privileges" do
@@ -35,8 +35,8 @@ describe Chef::Application::Knife do
35
35
 
36
36
  before(:each) do
37
37
  @knife = Chef::Application::Knife.new
38
- @knife.stub!(:puts)
39
- Chef::Knife.stub!(:list_commands)
38
+ @knife.stub(:puts)
39
+ Chef::Knife.stub(:list_commands)
40
40
  end
41
41
 
42
42
  it "should exit 1 and print the options if no arguments are given at all" do
@@ -54,7 +54,7 @@ describe Chef::Application::Knife do
54
54
 
55
55
  it "should run a sub command with the applications command line option prototype" do
56
56
  with_argv(*%w{noop knife command with some args}) do
57
- knife = mock(Chef::Knife)
57
+ knife = double(Chef::Knife)
58
58
  Chef::Knife.should_receive(:run).with(ARGV, @knife.options).and_return(knife)
59
59
  @knife.should_receive(:exit).with(0)
60
60
  @knife.run
@@ -76,7 +76,7 @@ describe Chef::Application::Knife do
76
76
  describe "when given a path to the client key" do
77
77
  it "expands a relative path relative to the CWD" do
78
78
  relative_path = '.chef/client.pem'
79
- Dir.stub!(:pwd).and_return(CHEF_SPEC_DATA)
79
+ Dir.stub(:pwd).and_return(CHEF_SPEC_DATA)
80
80
  with_argv(*%W{noop knife command -k #{relative_path}}) do
81
81
  @knife.should_receive(:exit).with(0)
82
82
  @knife.run
@@ -158,7 +158,7 @@ describe Chef::Application::Knife do
158
158
 
159
159
  it "should run a sub command with the applications command line option prototype" do
160
160
  with_argv(*%w{noop knife command with some args}) do
161
- knife = mock(Chef::Knife)
161
+ knife = double(Chef::Knife)
162
162
  Chef::Knife.should_receive(:run).with(ARGV, @knife.options).and_return(knife)
163
163
  @knife.should_receive(:exit).with(0)
164
164
  @knife.run
@@ -20,9 +20,9 @@ require 'spec_helper'
20
20
  describe Chef::Application::Solo do
21
21
  before do
22
22
  @app = Chef::Application::Solo.new
23
- @app.stub!(:configure_opt_parser).and_return(true)
24
- @app.stub!(:configure_chef).and_return(true)
25
- @app.stub!(:configure_logging).and_return(true)
23
+ @app.stub(:configure_opt_parser).and_return(true)
24
+ @app.stub(:configure_chef).and_return(true)
25
+ @app.stub(:configure_logging).and_return(true)
26
26
  Chef::Config[:recipe_url] = false
27
27
  Chef::Config[:json_attribs] = false
28
28
  Chef::Config[:solo] = true
@@ -70,14 +70,14 @@ describe Chef::Application::Solo do
70
70
  before do
71
71
  Chef::Config[:cookbook_path] = "#{Dir.tmpdir}/chef-solo/cookbooks"
72
72
  Chef::Config[:recipe_url] = "http://junglist.gen.nz/recipes.tgz"
73
- FileUtils.stub!(:mkdir_p).and_return(true)
73
+ FileUtils.stub(:mkdir_p).and_return(true)
74
74
  @tarfile = StringIO.new("remote_tarball_content")
75
- @app.stub!(:open).with("http://junglist.gen.nz/recipes.tgz").and_yield(@tarfile)
75
+ @app.stub(:open).with("http://junglist.gen.nz/recipes.tgz").and_yield(@tarfile)
76
76
 
77
77
  @target_file = StringIO.new
78
- File.stub!(:open).with("#{Dir.tmpdir}/chef-solo/recipes.tgz", "wb").and_yield(@target_file)
78
+ File.stub(:open).with("#{Dir.tmpdir}/chef-solo/recipes.tgz", "wb").and_yield(@target_file)
79
79
 
80
- Chef::Mixin::Command.stub!(:run_command).and_return(true)
80
+ Chef::Mixin::Command.stub(:run_command).and_return(true)
81
81
  end
82
82
 
83
83
  it "should create the recipes path based on the parent of the cookbook path" do
@@ -107,14 +107,14 @@ describe Chef::Application::Solo do
107
107
  before do
108
108
  Chef::Config[:solo] = true
109
109
 
110
- Chef::Daemon.stub!(:change_privilege)
111
- @chef_client = mock("Chef::Client")
112
- Chef::Client.stub!(:new).and_return(@chef_client)
110
+ Chef::Daemon.stub(:change_privilege)
111
+ @chef_client = double("Chef::Client")
112
+ Chef::Client.stub(:new).and_return(@chef_client)
113
113
  @app = Chef::Application::Solo.new
114
114
  # this is all stuff the reconfigure method needs
115
- @app.stub!(:configure_opt_parser).and_return(true)
116
- @app.stub!(:configure_chef).and_return(true)
117
- @app.stub!(:configure_logging).and_return(true)
115
+ @app.stub(:configure_opt_parser).and_return(true)
116
+ @app.stub(:configure_chef).and_return(true)
117
+ @app.stub(:configure_logging).and_return(true)
118
118
  end
119
119
 
120
120
  it "should change privileges" do
@@ -24,8 +24,8 @@ describe Chef::Application do
24
24
  ARGV.clear
25
25
  Chef::Log.logger = Logger.new(StringIO.new)
26
26
  @app = Chef::Application.new
27
- Dir.stub!(:chdir).and_return(0)
28
- @app.stub!(:reconfigure)
27
+ Dir.stub(:chdir).and_return(0)
28
+ @app.stub(:reconfigure)
29
29
  Chef::Log.init(STDERR)
30
30
  end
31
31
 
@@ -36,8 +36,8 @@ describe Chef::Application do
36
36
  describe "reconfigure" do
37
37
  before do
38
38
  @app = Chef::Application.new
39
- @app.stub!(:configure_chef).and_return(true)
40
- @app.stub!(:configure_logging).and_return(true)
39
+ @app.stub(:configure_chef).and_return(true)
40
+ @app.stub(:configure_logging).and_return(true)
41
41
  end
42
42
 
43
43
  it "should configure chef" do
@@ -59,10 +59,10 @@ describe Chef::Application do
59
59
 
60
60
  describe "run" do
61
61
  before do
62
- @app.stub!(:setup_application).and_return(true)
63
- @app.stub!(:run_application).and_return(true)
64
- @app.stub!(:configure_chef).and_return(true)
65
- @app.stub!(:configure_logging).and_return(true)
62
+ @app.stub(:setup_application).and_return(true)
63
+ @app.stub(:run_application).and_return(true)
64
+ @app.stub(:configure_chef).and_return(true)
65
+ @app.stub(:configure_logging).and_return(true)
66
66
  end
67
67
 
68
68
  it "should reconfigure the application before running" do
@@ -85,8 +85,8 @@ describe Chef::Application do
85
85
  describe "configure_chef" do
86
86
  before do
87
87
  @app = Chef::Application.new
88
- #Chef::Config.stub!(:merge!).and_return(true)
89
- @app.stub!(:parse_options).and_return(true)
88
+ #Chef::Config.stub(:merge!).and_return(true)
89
+ @app.stub(:parse_options).and_return(true)
90
90
  end
91
91
 
92
92
  it "should parse the commandline options" do
@@ -152,12 +152,12 @@ describe Chef::Application do
152
152
  describe "when configuring the logger" do
153
153
  before do
154
154
  @app = Chef::Application.new
155
- Chef::Log.stub!(:init)
155
+ Chef::Log.stub(:init)
156
156
  end
157
157
 
158
158
  it "should initialise the chef logger" do
159
- Chef::Log.stub!(:level=)
160
- @monologger = mock("Monologger")
159
+ Chef::Log.stub(:level=)
160
+ @monologger = double("Monologger")
161
161
  MonoLogger.should_receive(:new).with(Chef::Config[:log_location]).and_return(@monologger)
162
162
  Chef::Log.should_receive(:init).with(@monologger)
163
163
  @app.configure_logging
@@ -173,7 +173,7 @@ describe Chef::Application do
173
173
  shared_examples_for "log_level_is_auto" do
174
174
  context "when STDOUT is to a tty" do
175
175
  before do
176
- STDOUT.stub!(:tty?).and_return(true)
176
+ STDOUT.stub(:tty?).and_return(true)
177
177
  end
178
178
 
179
179
  it "configures the log level to :warn" do
@@ -195,7 +195,7 @@ describe Chef::Application do
195
195
 
196
196
  context "when STDOUT is not to a tty" do
197
197
  before do
198
- STDOUT.stub!(:tty?).and_return(false)
198
+ STDOUT.stub(:tty?).and_return(false)
199
199
  end
200
200
 
201
201
  it "configures the log level to :info" do
@@ -230,9 +230,9 @@ describe Chef::Application do
230
230
 
231
231
  describe "class method: fatal!" do
232
232
  before do
233
- STDERR.stub!(:puts).with("FATAL: blah").and_return(true)
234
- Chef::Log.stub!(:fatal).with("blah").and_return(true)
235
- Process.stub!(:exit).and_return(true)
233
+ STDERR.stub(:puts).with("FATAL: blah").and_return(true)
234
+ Chef::Log.stub(:fatal).and_return(true)
235
+ Process.stub(:exit).and_return(true)
236
236
  end
237
237
 
238
238
  it "should log an error message to the logger" do
@@ -281,7 +281,7 @@ describe Chef::Application do
281
281
  @app.config[:config_file] = "/tmp/non-existing-dir/file"
282
282
  config_file_regexp = Regexp.new @app.config[:config_file]
283
283
  Chef::Log.should_receive(:warn).at_least(:once).with(config_file_regexp).and_return(true)
284
- Chef::Log.should_receive(:warn).any_number_of_times.and_return(true)
284
+ Chef::Log.stub(:warn).and_return(true)
285
285
  @app.configure_chef
286
286
  end
287
287
  end
@@ -26,8 +26,8 @@ describe Chef::Checksum::Storage::Filesystem do
26
26
 
27
27
  @now = Time.now
28
28
 
29
- Time.stub!(:now).and_return(@now)
30
- Chef::Config.stub!(:checksum_path).and_return("/var/chef/checksums")
29
+ Time.stub(:now).and_return(@now)
30
+ Chef::Config.stub(:checksum_path).and_return("/var/chef/checksums")
31
31
 
32
32
  @checksum_of_the_file = "3fafecfb15585ede6b840158cbc2f399"
33
33
  @storage = Chef::Checksum::Storage::Filesystem.new("/not/used/path", @checksum_of_the_file)
@@ -37,9 +37,9 @@ shared_examples_for Chef::Client do
37
37
  :platform => 'example-platform',
38
38
  :platform_version => 'example-platform-1.0',
39
39
  :data => {} }
40
- ohai_data.stub!(:all_plugins).and_return(true)
41
- ohai_data.stub!(:data).and_return(ohai_data)
42
- Ohai::System.stub!(:new).and_return(ohai_data)
40
+ ohai_data.stub(:all_plugins).and_return(true)
41
+ ohai_data.stub(:data).and_return(ohai_data)
42
+ Ohai::System.stub(:new).and_return(ohai_data)
43
43
 
44
44
  @node = Chef::Node.new
45
45
  @node.name(@fqdn)
@@ -81,7 +81,7 @@ shared_examples_for Chef::Client do
81
81
 
82
82
  context "and STDOUT is a TTY" do
83
83
  before do
84
- STDOUT.stub!(:tty?).and_return(true)
84
+ STDOUT.stub(:tty?).and_return(true)
85
85
  end
86
86
 
87
87
  it "configures the :doc formatter" do
@@ -104,7 +104,7 @@ shared_examples_for Chef::Client do
104
104
 
105
105
  context "and STDOUT is not a TTY" do
106
106
  before do
107
- STDOUT.stub!(:tty?).and_return(false)
107
+ STDOUT.stub(:tty?).and_return(false)
108
108
  end
109
109
 
110
110
  it "configures the :null formatter" do
@@ -168,10 +168,10 @@ shared_examples_for Chef::Client do
168
168
  describe "run" do
169
169
 
170
170
  it "should identify the node and run ohai, then register the client" do
171
- mock_chef_rest_for_node = mock("Chef::REST (node)")
172
- mock_chef_rest_for_cookbook_sync = mock("Chef::REST (cookbook sync)")
173
- mock_chef_rest_for_node_save = mock("Chef::REST (node save)")
174
- mock_chef_runner = mock("Chef::Runner")
171
+ mock_chef_rest_for_node = double("Chef::REST (node)")
172
+ mock_chef_rest_for_cookbook_sync = double("Chef::REST (cookbook sync)")
173
+ mock_chef_rest_for_node_save = double("Chef::REST (node save)")
174
+ mock_chef_runner = double("Chef::Runner")
175
175
 
176
176
  # --Client.register
177
177
  # Make sure Client#register thinks the client key doesn't
@@ -253,15 +253,15 @@ shared_examples_for Chef::Client do
253
253
  end
254
254
 
255
255
  it "should remove the run_lock on failure of #load_node" do
256
- @run_lock = mock("Chef::RunLock", :acquire => true)
257
- Chef::RunLock.stub!(:new).and_return(@run_lock)
256
+ @run_lock = double("Chef::RunLock", :acquire => true)
257
+ Chef::RunLock.stub(:new).and_return(@run_lock)
258
258
 
259
- @events = mock("Chef::EventDispatch::Dispatcher").as_null_object
260
- Chef::EventDispatch::Dispatcher.stub!(:new).and_return(@events)
259
+ @events = double("Chef::EventDispatch::Dispatcher").as_null_object
260
+ Chef::EventDispatch::Dispatcher.stub(:new).and_return(@events)
261
261
 
262
262
  # @events is created on Chef::Client.new, so we need to recreate it after mocking
263
263
  @client = Chef::Client.new
264
- @client.stub!(:load_node).and_raise(Exception)
264
+ @client.stub(:load_node).and_raise(Exception)
265
265
  @run_lock.should_receive(:release)
266
266
  if(Chef::Config[:client_fork] && !windows?)
267
267
  @client.should_receive(:fork) do |&block|
@@ -274,8 +274,8 @@ shared_examples_for Chef::Client do
274
274
  describe "when notifying other objects of the status of the chef run" do
275
275
  before do
276
276
  Chef::Client.clear_notifications
277
- Chef::Node.stub!(:find_or_create).and_return(@node)
278
- @node.stub!(:save)
277
+ Chef::Node.stub(:find_or_create).and_return(@node)
278
+ @node.stub(:save)
279
279
  @client.load_node
280
280
  @client.build_node
281
281
  end
@@ -324,7 +324,7 @@ shared_examples_for Chef::Client do
324
324
 
325
325
  # build_node will call Node#expand! with server, which will
326
326
  # eventually hit the server to expand the included role.
327
- mock_chef_rest = mock("Chef::REST")
327
+ mock_chef_rest = double("Chef::REST")
328
328
  mock_chef_rest.should_receive(:get_rest).with("roles/role_containing_cookbook1").and_return(role_containing_cookbook1)
329
329
  Chef::REST.should_receive(:new).and_return(mock_chef_rest)
330
330
 
@@ -332,7 +332,7 @@ shared_examples_for Chef::Client do
332
332
  @node[:roles].should be_nil
333
333
  @node[:recipes].should be_nil
334
334
 
335
- @client.policy_builder.stub!(:node).and_return(@node)
335
+ @client.policy_builder.stub(:node).and_return(@node)
336
336
 
337
337
  # chefspec and possibly others use the return value of this method
338
338
  @client.build_node.should == @node
@@ -385,7 +385,7 @@ shared_examples_for Chef::Client do
385
385
 
386
386
  context "fatal admin check is configured" do
387
387
  it "should not raise an exception" do
388
- @client.do_windows_admin_check.should_not raise_error(Chef::Exceptions::WindowsNotAdmin)
388
+ @client.do_windows_admin_check.should_not raise_error
389
389
  end
390
390
  end
391
391
  end
@@ -402,7 +402,7 @@ shared_examples_for Chef::Client do
402
402
 
403
403
  context "fatal admin check is configured" do
404
404
  it "should raise an exception" do
405
- @client.do_windows_admin_check.should_not raise_error(Chef::Exceptions::WindowsNotAdmin)
405
+ @client.do_windows_admin_check.should_not raise_error
406
406
  end
407
407
  end
408
408
  end
@@ -422,7 +422,7 @@ shared_examples_for Chef::Client do
422
422
  @client = Chef::Client.new(nil, :override_runlist => 'role[a], role[b]')
423
423
  end
424
424
 
425
- it "should override the run list and save original runlist" do
425
+ it "should override the run list and skip the final node save" do
426
426
  @client = Chef::Client.new(nil, :override_runlist => 'role[test_role]')
427
427
  @client.node = @node
428
428
 
@@ -434,11 +434,11 @@ shared_examples_for Chef::Client do
434
434
 
435
435
  original_runlist = @node.run_list.dup
436
436
 
437
- mock_chef_rest = mock("Chef::REST")
437
+ mock_chef_rest = double("Chef::REST")
438
438
  mock_chef_rest.should_receive(:get_rest).with("roles/test_role").and_return(override_role)
439
439
  Chef::REST.should_receive(:new).and_return(mock_chef_rest)
440
440
 
441
- @node.should_receive(:save).and_return(nil)
441
+ @node.should_not_receive(:save)
442
442
 
443
443
  @client.policy_builder.stub(:node).and_return(@node)
444
444
  @client.policy_builder.build_node
@@ -99,8 +99,8 @@ describe Chef::Config do
99
99
 
100
100
  describe "class method: manage_secret_key" do
101
101
  before do
102
- Chef::FileCache.stub!(:load).and_return(true)
103
- Chef::FileCache.stub!(:has_key?).with("chef_server_cookie_id").and_return(false)
102
+ Chef::FileCache.stub(:load).and_return(true)
103
+ Chef::FileCache.stub(:has_key?).with("chef_server_cookie_id").and_return(false)
104
104
  end
105
105
 
106
106
  it "should generate and store a chef server cookie id" do
@@ -110,7 +110,7 @@ describe Chef::Config do
110
110
 
111
111
  describe "when the filecache has a chef server cookie id key" do
112
112
  before do
113
- Chef::FileCache.stub!(:has_key?).with("chef_server_cookie_id").and_return(true)
113
+ Chef::FileCache.stub(:has_key?).with("chef_server_cookie_id").and_return(true)
114
114
  end
115
115
 
116
116
  it "should not generate and store a chef server cookie id" do
@@ -132,7 +132,7 @@ describe Chef::Config do
132
132
  it "should return a windows path on windows systems" do
133
133
  platform_mock :windows do
134
134
  path = "/etc/chef/cookbooks"
135
- ENV.stub!(:[]).with('SYSTEMDRIVE').and_return('C:')
135
+ ENV.stub(:[]).with('SYSTEMDRIVE').and_return('C:')
136
136
  # match on a regex that looks for the base path with an optional
137
137
  # system drive at the beginning (c:)
138
138
  # system drive is not hardcoded b/c it can change and b/c it is not present on linux systems
@@ -247,7 +247,7 @@ describe Chef::Cookbook::Metadata do
247
247
  it "should not accept anything but a string for display_name" do
248
248
  lambda {
249
249
  @meta.grouping("db/mysql/databases", :title => "foo")
250
- }.should_not raise_error(ArgumentError)
250
+ }.should_not raise_error
251
251
  lambda {
252
252
  @meta.grouping("db/mysql/databases", :title => Hash.new)
253
253
  }.should raise_error(ArgumentError)
@@ -256,7 +256,7 @@ describe Chef::Cookbook::Metadata do
256
256
  it "should not accept anything but a string for the description" do
257
257
  lambda {
258
258
  @meta.grouping("db/mysql/databases", :description => "foo")
259
- }.should_not raise_error(ArgumentError)
259
+ }.should_not raise_error
260
260
  lambda {
261
261
  @meta.grouping("db/mysql/databases", :description => Hash.new)
262
262
  }.should raise_error(ArgumentError)
@@ -281,7 +281,7 @@ describe Chef::Cookbook::Metadata do
281
281
  it "should not accept anything but a string for display_name" do
282
282
  lambda {
283
283
  @meta.attribute("db/mysql/databases", :display_name => "foo")
284
- }.should_not raise_error(ArgumentError)
284
+ }.should_not raise_error
285
285
  lambda {
286
286
  @meta.attribute("db/mysql/databases", :display_name => Hash.new)
287
287
  }.should raise_error(ArgumentError)
@@ -290,7 +290,7 @@ describe Chef::Cookbook::Metadata do
290
290
  it "should not accept anything but a string for the description" do
291
291
  lambda {
292
292
  @meta.attribute("db/mysql/databases", :description => "foo")
293
- }.should_not raise_error(ArgumentError)
293
+ }.should_not raise_error
294
294
  lambda {
295
295
  @meta.attribute("db/mysql/databases", :description => Hash.new)
296
296
  }.should raise_error(ArgumentError)
@@ -299,7 +299,7 @@ describe Chef::Cookbook::Metadata do
299
299
  it "should not accept anything but an array of strings for choice" do
300
300
  lambda {
301
301
  @meta.attribute("db/mysql/databases", :choice => ['dedicated', 'shared'])
302
- }.should_not raise_error(ArgumentError)
302
+ }.should_not raise_error
303
303
  lambda {
304
304
  @meta.attribute("db/mysql/databases", :choice => [10, 'shared'])
305
305
  }.should raise_error(ArgumentError)
@@ -316,10 +316,10 @@ describe Chef::Cookbook::Metadata do
316
316
  it "should let calculated be true or false" do
317
317
  lambda {
318
318
  @meta.attribute("db/mysql/databases", :calculated => true)
319
- }.should_not raise_error(ArgumentError)
319
+ }.should_not raise_error
320
320
  lambda {
321
321
  @meta.attribute("db/mysql/databases", :calculated => false)
322
- }.should_not raise_error(ArgumentError)
322
+ }.should_not raise_error
323
323
  lambda {
324
324
  @meta.attribute("db/mysql/databases", :calculated => Hash.new)
325
325
  }.should raise_error(ArgumentError)
@@ -333,13 +333,13 @@ describe Chef::Cookbook::Metadata do
333
333
  it "accepts String for the attribute type" do
334
334
  lambda {
335
335
  @meta.attribute("db/mysql/databases", :type => "string")
336
- }.should_not raise_error(ArgumentError)
336
+ }.should_not raise_error
337
337
  end
338
338
 
339
339
  it "accepts Array for the attribute type" do
340
340
  lambda {
341
341
  @meta.attribute("db/mysql/databases", :type => "array")
342
- }.should_not raise_error(ArgumentError)
342
+ }.should_not raise_error
343
343
  lambda {
344
344
  @meta.attribute("db/mysql/databases", :type => Array.new)
345
345
  }.should raise_error(ArgumentError)
@@ -348,38 +348,38 @@ describe Chef::Cookbook::Metadata do
348
348
  it "accepts symbol for the attribute type" do
349
349
  lambda {
350
350
  @meta.attribute("db/mysql/databases", :type => "symbol")
351
- }.should_not raise_error(ArgumentError)
351
+ }.should_not raise_error
352
352
  end
353
353
 
354
354
  it "should let type be hash (backwards compatability only)" do
355
355
  lambda {
356
356
  @meta.attribute("db/mysql/databases", :type => "hash")
357
- }.should_not raise_error(ArgumentError)
357
+ }.should_not raise_error
358
358
  end
359
359
 
360
360
  it "should let required be required, recommended or optional" do
361
361
  lambda {
362
362
  @meta.attribute("db/mysql/databases", :required => 'required')
363
- }.should_not raise_error(ArgumentError)
363
+ }.should_not raise_error
364
364
  lambda {
365
365
  @meta.attribute("db/mysql/databases", :required => 'recommended')
366
- }.should_not raise_error(ArgumentError)
366
+ }.should_not raise_error
367
367
  lambda {
368
368
  @meta.attribute("db/mysql/databases", :required => 'optional')
369
- }.should_not raise_error(ArgumentError)
369
+ }.should_not raise_error
370
370
  end
371
371
 
372
372
  it "should convert required true to required" do
373
373
  lambda {
374
374
  @meta.attribute("db/mysql/databases", :required => true)
375
- }.should_not raise_error(ArgumentError)
375
+ }.should_not raise_error
376
376
  #attrib = @meta.attributes["db/mysql/databases"][:required].should == "required"
377
377
  end
378
378
 
379
379
  it "should convert required false to optional" do
380
380
  lambda {
381
381
  @meta.attribute("db/mysql/databases", :required => false)
382
- }.should_not raise_error(ArgumentError)
382
+ }.should_not raise_error
383
383
  #attrib = @meta.attributes["db/mysql/databases"][:required].should == "optional"
384
384
  end
385
385
 
@@ -391,7 +391,7 @@ describe Chef::Cookbook::Metadata do
391
391
  it "should make sure recipes is an array" do
392
392
  lambda {
393
393
  @meta.attribute("db/mysql/databases", :recipes => [])
394
- }.should_not raise_error(ArgumentError)
394
+ }.should_not raise_error
395
395
  lambda {
396
396
  @meta.attribute("db/mysql/databases", :required => Hash.new)
397
397
  }.should raise_error(ArgumentError)
@@ -405,13 +405,13 @@ describe Chef::Cookbook::Metadata do
405
405
  it "should allow the default value to be a string, array, or hash" do
406
406
  lambda {
407
407
  @meta.attribute("db/mysql/databases", :default => [])
408
- }.should_not raise_error(ArgumentError)
408
+ }.should_not raise_error
409
409
  lambda {
410
410
  @meta.attribute("db/mysql/databases", :default => {})
411
- }.should_not raise_error(ArgumentError)
411
+ }.should_not raise_error
412
412
  lambda {
413
413
  @meta.attribute("db/mysql/databases", :default => "alice in chains")
414
- }.should_not raise_error(ArgumentError)
414
+ }.should_not raise_error
415
415
  lambda {
416
416
  @meta.attribute("db/mysql/databases", :required => :not_gonna_do_it)
417
417
  }.should raise_error(ArgumentError)
@@ -441,14 +441,14 @@ describe Chef::Cookbook::Metadata do
441
441
  :default => "b"
442
442
  }
443
443
  @meta.attribute("db/mysql/databases", attrs)
444
- }.should_not raise_error(ArgumentError)
444
+ }.should_not raise_error
445
445
  lambda {
446
446
  attrs = {
447
447
  :choice => [ "a", "b", "c", "d", "e"],
448
448
  :default => ["b", "d"]
449
449
  }
450
450
  @meta.attribute("db/mysql/databases", attrs)
451
- }.should_not raise_error(ArgumentError)
451
+ }.should_not raise_error
452
452
  end
453
453
 
454
454
  it "should error if default is not a choice" do