ppl 3.0.0 → 4.0.3

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 (334) hide show
  1. checksums.yaml +5 -5
  2. data/.editorconfig +16 -0
  3. data/.eleventy.js +86 -0
  4. data/.eleventyignore +1 -0
  5. data/.github/workflows/build.yml +61 -0
  6. data/.gitignore +3 -1
  7. data/Rakefile +1 -18
  8. data/{CODE_OF_CONDUCT.md → code_of_conduct.md} +1 -1
  9. data/features/step_definitions/ppl_steps.rb +27 -27
  10. data/gh-pages/Gemfile +2 -0
  11. data/gh-pages/_config.yml +5 -0
  12. data/gh-pages/_includes/changelog.html +23 -0
  13. data/gh-pages/_includes/development-sidebar.html +25 -0
  14. data/gh-pages/_includes/footer.html +22 -0
  15. data/gh-pages/_includes/header.html +43 -0
  16. data/gh-pages/_includes/news.html +36 -0
  17. data/gh-pages/_includes/tip.html +54 -0
  18. data/gh-pages/_layouts/changelog.html +1 -0
  19. data/gh-pages/_layouts/command.html +104 -0
  20. data/gh-pages/_layouts/configuration.html +71 -0
  21. data/gh-pages/_layouts/development.html +20 -0
  22. data/gh-pages/_layouts/frontpage.html +6 -0
  23. data/gh-pages/_layouts/integration.html +44 -0
  24. data/gh-pages/_layouts/news.html +2 -0
  25. data/gh-pages/_layouts/page.html +6 -0
  26. data/gh-pages/_layouts/tip.html +2 -0
  27. data/gh-pages/_posts/2012-01-15-first-post.md +16 -0
  28. data/gh-pages/_posts/2012-12-20-1.0.0.md +19 -0
  29. data/gh-pages/_posts/2012-12-20-1.1.0.md +28 -0
  30. data/gh-pages/_posts/2012-12-20-1.2.0.md +18 -0
  31. data/gh-pages/_posts/2012-12-21-1.3.0.md +20 -0
  32. data/gh-pages/_posts/2012-12-21-thank-you-for-your-all-your-feedback.md +26 -0
  33. data/gh-pages/_posts/2012-12-22-1.4.1.md +21 -0
  34. data/gh-pages/_posts/2012-12-22-1.5.0.md +17 -0
  35. data/gh-pages/_posts/2012-12-23-1.5.1.md +13 -0
  36. data/gh-pages/_posts/2012-12-23-1.5.2.md +15 -0
  37. data/gh-pages/_posts/2012-12-26-1.5.3.md +19 -0
  38. data/gh-pages/_posts/2012-12-27-1.6.0.md +18 -0
  39. data/gh-pages/_posts/2012-12-29-1.7.0.md +18 -0
  40. data/gh-pages/_posts/2013-01-05-1.8.0.md +18 -0
  41. data/gh-pages/_posts/2013-01-06-1.9.0.md +20 -0
  42. data/gh-pages/_posts/2013-01-10-1.10.0.md +18 -0
  43. data/gh-pages/_posts/2013-01-20-1.11.0.md +14 -0
  44. data/gh-pages/_posts/2013-02-16-1.12.0.md +14 -0
  45. data/gh-pages/_posts/2013-02-17-1.13.0.md +29 -0
  46. data/gh-pages/_posts/2013-02-17-1.14.0.md +15 -0
  47. data/gh-pages/_posts/2013-02-17-1.14.1.md +18 -0
  48. data/gh-pages/_posts/2013-02-17-two-months-in.md +27 -0
  49. data/gh-pages/_posts/2013-03-16-1.15.0.md +28 -0
  50. data/gh-pages/_posts/2013-03-16-coloured-output-released.md +27 -0
  51. data/gh-pages/_posts/2013-04-10-ruby-2.0-compatibility.md +28 -0
  52. data/gh-pages/_posts/2013-04-11-1.15.1.md +13 -0
  53. data/gh-pages/_posts/2013-04-12-1.16.0.md +22 -0
  54. data/gh-pages/_posts/2013-04-14-1.17.0.md +15 -0
  55. data/gh-pages/_posts/2013-04-14-1.17.1.md +20 -0
  56. data/gh-pages/_posts/2013-04-14-1.17.2.md +13 -0
  57. data/gh-pages/_posts/2013-04-15-sync-alias.md +31 -0
  58. data/gh-pages/_posts/2013-04-15-utf8-fixed-and-more.md +37 -0
  59. data/gh-pages/_posts/2013-04-16-1.18.0.md +15 -0
  60. data/gh-pages/_posts/2013-04-16-set-up-color-output.md +47 -0
  61. data/gh-pages/_posts/2013-04-19-1.19.0.md +13 -0
  62. data/gh-pages/_posts/2013-04-19-1.20.0.md +15 -0
  63. data/gh-pages/_posts/2013-04-20-1.21.0.md +16 -0
  64. data/gh-pages/_posts/2013-04-20-1.22.0.md +14 -0
  65. data/gh-pages/_posts/2013-04-20-1.22.1.md +13 -0
  66. data/gh-pages/_posts/2013-04-21-1.22.2.md +15 -0
  67. data/gh-pages/_posts/2013-04-21-1.23.0.md +35 -0
  68. data/gh-pages/_posts/2013-04-23-1.24.0.md +16 -0
  69. data/gh-pages/_posts/2013-04-24-1.25.0.md +21 -0
  70. data/gh-pages/_posts/2013-05-09-2.0.0.md +33 -0
  71. data/gh-pages/_posts/2013-05-09-version-2.0.0-released.md +32 -0
  72. data/gh-pages/_posts/2013-07-20-2.1.0.md +36 -0
  73. data/gh-pages/_posts/2013-07-20-2.2.0.md +20 -0
  74. data/gh-pages/_posts/2013-10-12-2.3.0.md +19 -0
  75. data/gh-pages/_posts/2014-03-30-2.3.1.md +25 -0
  76. data/gh-pages/_posts/2015-01-05-2.3.2.md +18 -0
  77. data/gh-pages/_posts/2015-12-03-get-involved.md +29 -0
  78. data/gh-pages/_posts/2015-12-05-2.3.3.md +16 -0
  79. data/gh-pages/_posts/2016-01-02-2.4.0.md +19 -0
  80. data/gh-pages/_posts/2017-05-01-2.4.1.md +12 -0
  81. data/gh-pages/_posts/2017-10-23-sleep-mode.md +18 -0
  82. data/gh-pages/_posts/2018-01-03-3.0.1.md +12 -0
  83. data/gh-pages/_stylesheets/ppl/color.less +119 -0
  84. data/gh-pages/_stylesheets/ppl/layout.less +54 -0
  85. data/gh-pages/_stylesheets/ppl/style.less +185 -0
  86. data/gh-pages/_stylesheets/ppl/typography.less +59 -0
  87. data/gh-pages/development/changelog/index.md +18 -0
  88. data/gh-pages/development/changelog/split.rb +51 -0
  89. data/gh-pages/development/index.html +32 -0
  90. data/gh-pages/development/roadmap/index.md +15 -0
  91. data/gh-pages/documentation/about/index.html +63 -0
  92. data/gh-pages/documentation/commands/add/index.md +43 -0
  93. data/gh-pages/documentation/commands/age/add/index.md +40 -0
  94. data/gh-pages/documentation/commands/age/index.md +38 -0
  95. data/gh-pages/documentation/commands/bday/index.md +44 -0
  96. data/gh-pages/documentation/commands/completion/index.md +38 -0
  97. data/gh-pages/documentation/commands/email/index.md +64 -0
  98. data/gh-pages/documentation/commands/grep/index.md +32 -0
  99. data/gh-pages/documentation/commands/init/index.md +28 -0
  100. data/gh-pages/documentation/commands/ls/index.md +55 -0
  101. data/gh-pages/documentation/commands/mutt/index.md +36 -0
  102. data/gh-pages/documentation/commands/mv/index.md +26 -0
  103. data/gh-pages/documentation/commands/name/index.md +45 -0
  104. data/gh-pages/documentation/commands/nick/index.md +44 -0
  105. data/gh-pages/documentation/commands/org/index.md +45 -0
  106. data/gh-pages/documentation/commands/phone/index.md +56 -0
  107. data/gh-pages/documentation/commands/post/index.md +61 -0
  108. data/gh-pages/documentation/commands/pull/index.md +39 -0
  109. data/gh-pages/documentation/commands/push/index.md +36 -0
  110. data/gh-pages/documentation/commands/remote/index.md +40 -0
  111. data/gh-pages/documentation/commands/rm/index.md +23 -0
  112. data/gh-pages/documentation/commands/scrape/index.md +38 -0
  113. data/gh-pages/documentation/commands/shell/index.md +39 -0
  114. data/gh-pages/documentation/commands/show/index.md +33 -0
  115. data/gh-pages/documentation/commands/url/index.md +44 -0
  116. data/gh-pages/documentation/commands/version/index.md +27 -0
  117. data/gh-pages/documentation/configuration/address_book/index.md +22 -0
  118. data/gh-pages/documentation/configuration/alias/index.md +45 -0
  119. data/gh-pages/documentation/configuration/color/index.md +47 -0
  120. data/gh-pages/documentation/configuration/color_age/index.md +20 -0
  121. data/gh-pages/documentation/configuration/color_bday/index.md +20 -0
  122. data/gh-pages/documentation/configuration/color_email/index.md +21 -0
  123. data/gh-pages/documentation/configuration/color_ls/index.md +21 -0
  124. data/gh-pages/documentation/configuration/color_name/index.md +20 -0
  125. data/gh-pages/documentation/configuration/color_nick/index.md +20 -0
  126. data/gh-pages/documentation/configuration/color_org/index.md +20 -0
  127. data/gh-pages/documentation/configuration/color_phone/index.md +22 -0
  128. data/gh-pages/documentation/configuration/color_post/index.md +20 -0
  129. data/gh-pages/documentation/configuration/color_url/index.md +20 -0
  130. data/gh-pages/documentation/configuration/index.html +8 -0
  131. data/gh-pages/documentation/index.html +183 -0
  132. data/gh-pages/documentation/integration/bash/index.md +23 -0
  133. data/gh-pages/documentation/integration/google/index.md +26 -0
  134. data/gh-pages/documentation/integration/index.html +8 -0
  135. data/gh-pages/documentation/integration/mutt/index.md +35 -0
  136. data/gh-pages/documentation/integration/zsh/index.md +19 -0
  137. data/gh-pages/documentation/quick-start/index.html +88 -0
  138. data/gh-pages/documentation/tips/index.html +9 -0
  139. data/gh-pages/index.html +108 -0
  140. data/gh-pages/news/index.html +9 -0
  141. data/gh-pages/robots.txt +3 -0
  142. data/gh-pages/stylesheets/flatstrap.css +10 -0
  143. data/gh-pages/stylesheets/ppl.scss +235 -0
  144. data/gh-pages/wiki.png +0 -0
  145. data/lib/ppl.rb +4 -1
  146. data/lib/ppl/adapter/color.rb +0 -1
  147. data/lib/ppl/adapter/color/colored.rb +0 -1
  148. data/lib/ppl/adapter/email_scraper.rb +0 -1
  149. data/lib/ppl/adapter/email_scraper/mail.rb +4 -5
  150. data/lib/ppl/adapter/storage.rb +0 -1
  151. data/lib/ppl/adapter/storage/disk.rb +0 -1
  152. data/lib/ppl/adapter/storage/factory.rb +0 -1
  153. data/lib/ppl/adapter/vcard.rb +0 -1
  154. data/lib/ppl/adapter/vcard/vpim.rb +5 -1
  155. data/lib/ppl/application/bootstrap.rb +0 -1
  156. data/lib/ppl/application/command.rb +0 -1
  157. data/lib/ppl/application/command_suite.rb +0 -1
  158. data/lib/ppl/application/configuration.rb +0 -1
  159. data/lib/ppl/application/input.rb +0 -1
  160. data/lib/ppl/application/output.rb +0 -1
  161. data/lib/ppl/application/router.rb +0 -1
  162. data/lib/ppl/application/shell.rb +0 -1
  163. data/lib/ppl/command/add.rb +0 -1
  164. data/lib/ppl/command/age.rb +0 -1
  165. data/lib/ppl/command/attribute.rb +0 -1
  166. data/lib/ppl/command/bday.rb +0 -1
  167. data/lib/ppl/command/completion.rb +0 -1
  168. data/lib/ppl/command/email.rb +0 -1
  169. data/lib/ppl/command/external.rb +0 -1
  170. data/lib/ppl/command/help.rb +0 -1
  171. data/lib/ppl/command/init.rb +0 -1
  172. data/lib/ppl/command/ls.rb +0 -1
  173. data/lib/ppl/command/mutt.rb +0 -1
  174. data/lib/ppl/command/mv.rb +0 -1
  175. data/lib/ppl/command/name.rb +0 -1
  176. data/lib/ppl/command/nick.rb +0 -1
  177. data/lib/ppl/command/org.rb +0 -1
  178. data/lib/ppl/command/phone.rb +0 -1
  179. data/lib/ppl/command/post.rb +0 -1
  180. data/lib/ppl/command/rm.rb +0 -1
  181. data/lib/ppl/command/scrape.rb +0 -1
  182. data/lib/ppl/command/shell.rb +0 -1
  183. data/lib/ppl/command/show.rb +0 -1
  184. data/lib/ppl/command/url.rb +0 -1
  185. data/lib/ppl/command/version.rb +0 -1
  186. data/lib/ppl/entity/address_book.rb +0 -1
  187. data/lib/ppl/entity/contact.rb +0 -1
  188. data/lib/ppl/entity/email_address.rb +0 -1
  189. data/lib/ppl/entity/name.rb +0 -1
  190. data/lib/ppl/entity/phone_number.rb +0 -1
  191. data/lib/ppl/entity/postal_address.rb +0 -1
  192. data/lib/ppl/error/completion_not_found.rb +0 -1
  193. data/lib/ppl/error/contact_not_found.rb +0 -1
  194. data/lib/ppl/error/incorrect_usage.rb +0 -1
  195. data/lib/ppl/error/invalid_vcard.rb +1 -0
  196. data/lib/ppl/error/postal_address_not_found.rb +0 -1
  197. data/lib/ppl/format/address_book.rb +0 -1
  198. data/lib/ppl/format/address_book/ages.rb +0 -1
  199. data/lib/ppl/format/address_book/birthdays.rb +0 -1
  200. data/lib/ppl/format/address_book/email_addresses.rb +0 -1
  201. data/lib/ppl/format/address_book/mutt_query.rb +0 -1
  202. data/lib/ppl/format/address_book/names.rb +0 -1
  203. data/lib/ppl/format/address_book/nicknames.rb +0 -1
  204. data/lib/ppl/format/address_book/one_line.rb +0 -1
  205. data/lib/ppl/format/address_book/organizations.rb +0 -1
  206. data/lib/ppl/format/address_book/phone_numbers.rb +0 -1
  207. data/lib/ppl/format/address_book/postal_addresses.rb +0 -1
  208. data/lib/ppl/format/address_book/urls.rb +0 -1
  209. data/lib/ppl/format/contact.rb +0 -1
  210. data/lib/ppl/format/contact/age.rb +0 -1
  211. data/lib/ppl/format/contact/birthday.rb +0 -1
  212. data/lib/ppl/format/contact/email_addresses.rb +0 -1
  213. data/lib/ppl/format/contact/full.rb +0 -1
  214. data/lib/ppl/format/contact/nicknames.rb +0 -1
  215. data/lib/ppl/format/contact/organization.rb +0 -1
  216. data/lib/ppl/format/contact/phone_number.rb +0 -1
  217. data/lib/ppl/format/contact/postal_address.rb +0 -1
  218. data/lib/ppl/format/contact/postal_addresses.rb +0 -1
  219. data/lib/ppl/format/contact/urls.rb +0 -1
  220. data/lib/ppl/format/custom.rb +0 -1
  221. data/lib/ppl/format/custom/contact.rb +0 -1
  222. data/lib/ppl/format/custom/email_address.rb +0 -1
  223. data/lib/ppl/format/custom/phone_number.rb +0 -1
  224. data/lib/ppl/format/name.rb +0 -1
  225. data/lib/ppl/format/name/full_only.rb +0 -1
  226. data/lib/ppl/format/postal_address.rb +0 -1
  227. data/lib/ppl/format/postal_address/multi_line.rb +0 -1
  228. data/lib/ppl/format/postal_address/one_line.rb +0 -1
  229. data/lib/ppl/format/table.rb +0 -1
  230. data/lib/ppl/service/email_address.rb +0 -1
  231. data/lib/ppl/service/name.rb +0 -1
  232. data/lib/ppl/service/phone_number.rb +0 -1
  233. data/lib/ppl/service/postal_address.rb +0 -1
  234. data/{LICENSE → license} +0 -0
  235. data/makefile +18 -0
  236. data/package.json +23 -0
  237. data/ppl.gemspec +15 -13
  238. data/{README.md → readme.md} +12 -9
  239. data/site/_data/url.js +4 -0
  240. data/site/casts/hero.cast +189 -0
  241. data/site/development.njk +6 -0
  242. data/site/documentation.njk +6 -0
  243. data/site/index.njk +75 -0
  244. data/site/news.njk +6 -0
  245. data/site/style.scss +140 -0
  246. data/spec/ppl/adapter/color/colored_spec.rb +3 -4
  247. data/spec/ppl/adapter/color_spec.rb +0 -1
  248. data/spec/ppl/adapter/email_scraper/mail_spec.rb +13 -13
  249. data/spec/ppl/adapter/email_scraper_spec.rb +0 -1
  250. data/spec/ppl/adapter/output_spec.rb +7 -8
  251. data/spec/ppl/adapter/storage/disk_spec.rb +18 -19
  252. data/spec/ppl/adapter/storage/factory_spec.rb +3 -4
  253. data/spec/ppl/adapter/storage/git_spec.rb +31 -32
  254. data/spec/ppl/adapter/storage_spec.rb +3 -4
  255. data/spec/ppl/adapter/vcard/greencard_spec.rb +45 -45
  256. data/spec/ppl/adapter/vcard_spec.rb +0 -1
  257. data/spec/ppl/application/bootstrap_spec.rb +128 -129
  258. data/spec/ppl/application/command_spec.rb +8 -9
  259. data/spec/ppl/application/command_suite_spec.rb +7 -8
  260. data/spec/ppl/application/configuration_spec.rb +16 -17
  261. data/spec/ppl/application/input_spec.rb +2 -3
  262. data/spec/ppl/application/router_spec.rb +8 -9
  263. data/spec/ppl/application/shell_spec.rb +39 -40
  264. data/spec/ppl/command/add_spec.rb +6 -7
  265. data/spec/ppl/command/age_spec.rb +7 -8
  266. data/spec/ppl/command/attribute_spec.rb +22 -23
  267. data/spec/ppl/command/bday_spec.rb +11 -12
  268. data/spec/ppl/command/completion_spec.rb +7 -8
  269. data/spec/ppl/command/email_spec.rb +19 -20
  270. data/spec/ppl/command/external_spec.rb +7 -8
  271. data/spec/ppl/command/help_spec.rb +15 -16
  272. data/spec/ppl/command/init_spec.rb +5 -6
  273. data/spec/ppl/command/ls_spec.rb +12 -13
  274. data/spec/ppl/command/mutt_spec.rb +33 -34
  275. data/spec/ppl/command/mv_spec.rb +11 -12
  276. data/spec/ppl/command/name_spec.rb +17 -18
  277. data/spec/ppl/command/nick_spec.rb +1 -2
  278. data/spec/ppl/command/org_spec.rb +1 -2
  279. data/spec/ppl/command/phone_spec.rb +15 -16
  280. data/spec/ppl/command/post_spec.rb +29 -30
  281. data/spec/ppl/command/rm_spec.rb +3 -4
  282. data/spec/ppl/command/scrape_spec.rb +24 -25
  283. data/spec/ppl/command/shell_spec.rb +41 -42
  284. data/spec/ppl/command/show_spec.rb +4 -5
  285. data/spec/ppl/command/url_spec.rb +1 -2
  286. data/spec/ppl/command/version_spec.rb +4 -5
  287. data/spec/ppl/entity/address_book_spec.rb +1 -2
  288. data/spec/ppl/entity/contact_spec.rb +16 -17
  289. data/spec/ppl/entity/email_address_spec.rb +3 -4
  290. data/spec/ppl/entity/name_spec.rb +1 -2
  291. data/spec/ppl/entity/phone_number_spec.rb +5 -6
  292. data/spec/ppl/entity/postal_address_spec.rb +2 -3
  293. data/spec/ppl/format/address_book/ages_spec.rb +3 -4
  294. data/spec/ppl/format/address_book/birthdays_spec.rb +3 -4
  295. data/spec/ppl/format/address_book/email_addresses_spec.rb +3 -4
  296. data/spec/ppl/format/address_book/mutt_query_spec.rb +3 -4
  297. data/spec/ppl/format/address_book/names_spec.rb +3 -4
  298. data/spec/ppl/format/address_book/nicknames_spec.rb +4 -5
  299. data/spec/ppl/format/address_book/one_line_spec.rb +5 -6
  300. data/spec/ppl/format/address_book/organizations_spec.rb +3 -4
  301. data/spec/ppl/format/address_book/phone_numbers_spec.rb +3 -4
  302. data/spec/ppl/format/address_book/postal_addresses_spec.rb +2 -3
  303. data/spec/ppl/format/address_book/urls_spec.rb +3 -4
  304. data/spec/ppl/format/address_book_spec.rb +0 -1
  305. data/spec/ppl/format/contact/age_spec.rb +8 -9
  306. data/spec/ppl/format/contact/birthday_spec.rb +4 -5
  307. data/spec/ppl/format/contact/email_addresses_spec.rb +3 -4
  308. data/spec/ppl/format/contact/full_spec.rb +11 -12
  309. data/spec/ppl/format/contact/nicknames_spec.rb +4 -5
  310. data/spec/ppl/format/contact/organization_spec.rb +4 -5
  311. data/spec/ppl/format/contact/phone_number_spec.rb +4 -5
  312. data/spec/ppl/format/contact/postal_address_spec.rb +1 -2
  313. data/spec/ppl/format/contact/postal_addresses_spec.rb +3 -4
  314. data/spec/ppl/format/contact/urls_spec.rb +4 -5
  315. data/spec/ppl/format/contact_spec.rb +0 -1
  316. data/spec/ppl/format/custom/contact_spec.rb +13 -14
  317. data/spec/ppl/format/custom/email_address_spec.rb +3 -4
  318. data/spec/ppl/format/custom/phone_number_spec.rb +4 -5
  319. data/spec/ppl/format/custom_spec.rb +6 -7
  320. data/spec/ppl/format/name/full_only_spec.rb +4 -5
  321. data/spec/ppl/format/name_spec.rb +0 -1
  322. data/spec/ppl/format/postal_address/multi_line_spec.rb +10 -11
  323. data/spec/ppl/format/postal_address/one_line_spec.rb +9 -10
  324. data/spec/ppl/format/postal_address_spec.rb +0 -1
  325. data/spec/ppl/format/table_spec.rb +11 -11
  326. data/spec/ppl/service/email_address_spec.rb +13 -14
  327. data/spec/ppl/service/name_spec.rb +9 -10
  328. data/spec/ppl/service/phone_number_spec.rb +11 -12
  329. data/spec/ppl/service/postal_address_spec.rb +20 -21
  330. data/spec/spec_helper.rb +4 -0
  331. data/yarn.lock +3605 -0
  332. metadata +183 -22
  333. data/.travis.yml +0 -11
  334. data/COPYING +0 -339
@@ -1,4 +1,3 @@
1
-
2
1
  describe Ppl::Adapter::Storage do
3
2
 
4
3
  before(:each) do
@@ -32,13 +31,13 @@ describe Ppl::Adapter::Storage do
32
31
  describe "#require_contact" do
33
32
 
34
33
  it "should raise Ppl::Error::ContactNotFound if load fails" do
35
- @storage.stub(:load_contact) do |id| end
34
+ allow(@storage).to receive(:load_contact) do |id| end
36
35
  expect{@storage.require_contact("joe")}.to raise_error(Ppl::Error::ContactNotFound)
37
36
  end
38
37
 
39
38
  it "should return the loaded contact" do
40
- @storage.stub(:load_contact) do |id| Object.new end
41
- @storage.require_contact("joe").should be_an(Object)
39
+ allow(@storage).to receive(:load_contact) do |id| Object.new end
40
+ expect(@storage.require_contact("joe")).to be_an(Object)
42
41
  end
43
42
  end
44
43
 
@@ -11,70 +11,70 @@ describe Ppl::Adapter::Vcard::Vpim, "#encode" do
11
11
 
12
12
  it "should encode the contact's birthday" do
13
13
  @contact.birthday = Date.parse "2000-01-01"
14
- @adapter.encode(@contact).should include("BDAY:20000101")
14
+ expect(@adapter.encode(@contact)).to include("BDAY:20000101")
15
15
  end
16
16
 
17
17
  it "should encode the contact's full name" do
18
18
  @contact.name.full = "John Doe"
19
- @adapter.encode(@contact).should include("FN:John Doe")
19
+ expect(@adapter.encode(@contact)).to include("FN:John Doe")
20
20
  end
21
21
 
22
22
  it "should encode the contact's given name" do
23
23
  @contact.name.given = "John"
24
- @adapter.encode(@contact).should include("N:;John;;;")
24
+ expect(@adapter.encode(@contact)).to include("N:;John;;;")
25
25
  end
26
26
 
27
27
  it "should encode the contact's family name" do
28
28
  @contact.name.family = "Smith"
29
- @adapter.encode(@contact).should include("N:Smith;;;;")
29
+ expect(@adapter.encode(@contact)).to include("N:Smith;;;;")
30
30
  end
31
31
 
32
32
  it "should encode the contact's middle name" do
33
33
  @contact.name.middle = "Quentin"
34
- @adapter.encode(@contact).should include("N:;;Quentin;;")
34
+ expect(@adapter.encode(@contact)).to include("N:;;Quentin;;")
35
35
  end
36
36
 
37
37
  it "should encode the contact's name prefix" do
38
38
  @contact.name.prefix = "Mr."
39
- @adapter.encode(@contact).should include("N:;;;Mr.;")
39
+ expect(@adapter.encode(@contact)).to include("N:;;;Mr.;")
40
40
  end
41
41
 
42
42
  it "should encode the contact's name suffix" do
43
43
  @contact.name.suffix = "BSc"
44
- @adapter.encode(@contact).should include("N:;;;;BSc")
44
+ expect(@adapter.encode(@contact)).to include("N:;;;;BSc")
45
45
  end
46
46
 
47
47
  it "should encode the contact's email address" do
48
48
  @contact.email_addresses << Ppl::Entity::EmailAddress.new("john@example.org")
49
- @adapter.encode(@contact).should include("EMAIL:john@example.org")
49
+ expect(@adapter.encode(@contact)).to include("EMAIL:john@example.org")
50
50
  end
51
51
 
52
52
  it "should encode the contact's preferred email address as such" do
53
53
  email_address = Ppl::Entity::EmailAddress.new("john@example.org")
54
54
  email_address.preferred = true
55
55
  @contact.email_addresses << email_address
56
- @adapter.encode(@contact).should include("EMAIL;TYPE=pref:john@example.org")
56
+ expect(@adapter.encode(@contact)).to include("EMAIL;TYPE=pref:john@example.org")
57
57
  end
58
58
 
59
59
  it "should encode the contact's phone number" do
60
60
  @contact.phone_numbers << Ppl::Entity::PhoneNumber.new("01234567890")
61
- @adapter.encode(@contact).should include("TEL:01234567890")
61
+ expect(@adapter.encode(@contact)).to include("TEL:01234567890")
62
62
  end
63
63
 
64
64
  it "should encode the contact's preferred phone number as such" do
65
65
  @contact.phone_numbers << Ppl::Entity::PhoneNumber.new("01234567890")
66
66
  @contact.phone_numbers[0].preferred = true
67
- @adapter.encode(@contact).should include("TEL;TYPE=pref:01234567890")
67
+ expect(@adapter.encode(@contact)).to include("TEL;TYPE=pref:01234567890")
68
68
  end
69
69
 
70
70
  it "should encode the contact's phone number's type" do
71
71
  @contact.phone_numbers << Ppl::Entity::PhoneNumber.new("01234567890", "cell")
72
- @adapter.encode(@contact).should include("TEL;TYPE=cell:01234567890")
72
+ expect(@adapter.encode(@contact)).to include("TEL;TYPE=cell:01234567890")
73
73
  end
74
74
 
75
75
  it "should encode the contact's organization" do
76
76
  @contact.organizations.push("Example Ltd")
77
- @adapter.encode(@contact).should include("ORG:Example Ltd")
77
+ expect(@adapter.encode(@contact)).to include("ORG:Example Ltd")
78
78
  end
79
79
 
80
80
  describe "postal address encoding" do
@@ -86,54 +86,54 @@ describe Ppl::Adapter::Vcard::Vpim, "#encode" do
86
86
 
87
87
  it "should encode the address id" do
88
88
  @contact.postal_addresses[0].id = "home"
89
- @adapter.encode(@contact).should include("ADR;TYPE=home:;;;;;;")
89
+ expect(@adapter.encode(@contact)).to include("ADR;TYPE=home:;;;;;;")
90
90
  end
91
91
 
92
92
  it "should encode the preferred status of the address" do
93
93
  @contact.postal_addresses[0].preferred = true
94
- @adapter.encode(@contact).should include("ADR;TYPE=pref:;;;;;;")
94
+ expect(@adapter.encode(@contact)).to include("ADR;TYPE=pref:;;;;;;")
95
95
  end
96
96
 
97
97
  it "should encode the contact's street address" do
98
98
  @contact.postal_addresses[0].street = "1 Testing Road"
99
- @adapter.encode(@contact).should include("ADR:;;1 Testing Road;;;;")
99
+ expect(@adapter.encode(@contact)).to include("ADR:;;1 Testing Road;;;;")
100
100
  end
101
101
 
102
102
  it "should encode the contact's postal code" do
103
103
  @contact.postal_addresses[0].postal_code = "L7 8AA"
104
- @adapter.encode(@contact).should include("ADR:;;;;;L7 8AA;")
104
+ expect(@adapter.encode(@contact)).to include("ADR:;;;;;L7 8AA;")
105
105
  end
106
106
 
107
107
  it "should encode the contact's po box" do
108
108
  @contact.postal_addresses[0].po_box = "123456"
109
- @adapter.encode(@contact).should include("ADR:123456;;;;;;")
109
+ expect(@adapter.encode(@contact)).to include("ADR:123456;;;;;;")
110
110
  end
111
111
 
112
112
  it "should encode the contact's locality" do
113
113
  @contact.postal_addresses[0].locality = "Liverpool"
114
- @adapter.encode(@contact).should include("ADR:;;;Liverpool;;;")
114
+ expect(@adapter.encode(@contact)).to include("ADR:;;;Liverpool;;;")
115
115
  end
116
116
 
117
117
  it "should encode the contact's country" do
118
118
  @contact.postal_addresses[0].country = "UK"
119
- @adapter.encode(@contact).should include("ADR:;;;;;;UK")
119
+ expect(@adapter.encode(@contact)).to include("ADR:;;;;;;UK")
120
120
  end
121
121
 
122
122
  it "should encode the contact's region" do
123
123
  @contact.postal_addresses[0].region = "South West"
124
- @adapter.encode(@contact).should include("ADR:;;;;South West;;")
124
+ expect(@adapter.encode(@contact)).to include("ADR:;;;;South West;;")
125
125
  end
126
126
 
127
127
  end
128
128
 
129
129
  it "should encode the contact's URL" do
130
130
  @contact.urls.push "http://google.com"
131
- @adapter.encode(@contact).should include("URL:http://google.com")
131
+ expect(@adapter.encode(@contact)).to include("URL:http://google.com")
132
132
  end
133
133
 
134
134
  it "should encode the contact's nickname" do
135
135
  @contact.nicknames.push "Sleepy"
136
- @adapter.encode(@contact).should include("NICKNAME:Sleepy")
136
+ expect(@adapter.encode(@contact)).to include("NICKNAME:Sleepy")
137
137
  end
138
138
 
139
139
  end
@@ -152,7 +152,7 @@ describe Ppl::Adapter::Vcard::Vpim, "#decode" do
152
152
  "N:,test",
153
153
  "END:VCARD",
154
154
  ].join("\n")
155
- @adapter.decode(vcard).should be_a(Ppl::Entity::Contact)
155
+ expect(@adapter.decode(vcard)).to be_a(Ppl::Entity::Contact)
156
156
  end
157
157
 
158
158
  it "should decode the contact's birthday" do
@@ -163,7 +163,7 @@ describe Ppl::Adapter::Vcard::Vpim, "#decode" do
163
163
  "BDAY:20120102",
164
164
  "END:VCARD",
165
165
  ].join("\n")
166
- @adapter.decode(vcard).birthday.strftime('%Y-%m-%d').should eq "2012-01-02"
166
+ expect(@adapter.decode(vcard).birthday.strftime('%Y-%m-%d')).to eq "2012-01-02"
167
167
  end
168
168
 
169
169
  it "should decode the contact's name" do
@@ -177,7 +177,7 @@ describe Ppl::Adapter::Vcard::Vpim, "#decode" do
177
177
  ].join("\n")
178
178
  contact = @adapter.decode(vcard)
179
179
 
180
- contact.name.full.should eq "John Doe"
180
+ expect(contact.name.full).to eq "John Doe"
181
181
  end
182
182
 
183
183
  it "should decode the contact's email address" do
@@ -189,7 +189,7 @@ describe Ppl::Adapter::Vcard::Vpim, "#decode" do
189
189
  "END:VCARD",
190
190
  ].join("\n")
191
191
  contact = @adapter.decode(vcard)
192
- contact.email_addresses.first.address.should eq "home@example.org"
192
+ expect(contact.email_addresses.first.address).to eq "home@example.org"
193
193
  end
194
194
 
195
195
  it "should mark preferred email addresses as such" do
@@ -201,7 +201,7 @@ describe Ppl::Adapter::Vcard::Vpim, "#decode" do
201
201
  "END:VCARD",
202
202
  ].join("\n")
203
203
  contact = @adapter.decode(vcard)
204
- contact.email_addresses.first.preferred.should eq true
204
+ expect(contact.email_addresses.first.preferred).to eq true
205
205
  end
206
206
 
207
207
  it "should decode the contact's phone number" do
@@ -214,7 +214,7 @@ describe Ppl::Adapter::Vcard::Vpim, "#decode" do
214
214
  ].join("\n")
215
215
  contact = @adapter.decode(vcard)
216
216
  phone_number = contact.phone_numbers.first
217
- phone_number.number.should eq "01234567890"
217
+ expect(phone_number.number).to eq "01234567890"
218
218
  end
219
219
 
220
220
  it "should mark preferred phone numbers as such" do
@@ -227,7 +227,7 @@ describe Ppl::Adapter::Vcard::Vpim, "#decode" do
227
227
  ].join("\n")
228
228
  contact = @adapter.decode(vcard)
229
229
  phone_number = contact.phone_numbers.first
230
- phone_number.preferred.should eq true
230
+ expect(phone_number.preferred).to eq true
231
231
  end
232
232
 
233
233
  it "should decode the contact's phone number's type" do
@@ -240,7 +240,7 @@ describe Ppl::Adapter::Vcard::Vpim, "#decode" do
240
240
  ].join("\n")
241
241
  contact = @adapter.decode(vcard)
242
242
  phone_number = contact.phone_numbers.first
243
- phone_number.type.should eq "cell"
243
+ expect(phone_number.type).to eq "cell"
244
244
  end
245
245
 
246
246
  it "should decode the contact's phone number's nonstandard type" do
@@ -253,7 +253,7 @@ describe Ppl::Adapter::Vcard::Vpim, "#decode" do
253
253
  ].join("\n")
254
254
  contact = @adapter.decode(vcard)
255
255
  phone_number = contact.phone_numbers.first
256
- phone_number.type.should eq "testing"
256
+ expect(phone_number.type).to eq "testing"
257
257
  end
258
258
 
259
259
  it "should decode the contact's organization" do
@@ -265,7 +265,7 @@ describe Ppl::Adapter::Vcard::Vpim, "#decode" do
265
265
  "END:VCARD",
266
266
  ].join("\n")
267
267
  contact = @adapter.decode(vcard)
268
- contact.organizations.first.should eq "Example Ltd"
268
+ expect(contact.organizations.first).to eq "Example Ltd"
269
269
  end
270
270
 
271
271
  describe "postal address decoding" do
@@ -279,7 +279,7 @@ describe Ppl::Adapter::Vcard::Vpim, "#decode" do
279
279
  "END:VCARD",
280
280
  ].join("\n")
281
281
  contact = @adapter.decode(vcard)
282
- contact.postal_addresses[0].id.should eq "home"
282
+ expect(contact.postal_addresses[0].id).to eq "home"
283
283
  end
284
284
 
285
285
  it "should decode the postal address' ID even if it's a nonstandard type" do
@@ -291,7 +291,7 @@ describe Ppl::Adapter::Vcard::Vpim, "#decode" do
291
291
  "END:VCARD",
292
292
  ].join("\n")
293
293
  contact = @adapter.decode(vcard)
294
- contact.postal_addresses[0].id.should eq "nasa"
294
+ expect(contact.postal_addresses[0].id).to eq "nasa"
295
295
  end
296
296
 
297
297
  it "should assign the postal address a fallback ID if necessary" do
@@ -303,7 +303,7 @@ describe Ppl::Adapter::Vcard::Vpim, "#decode" do
303
303
  "END:VCARD",
304
304
  ].join("\n")
305
305
  contact = @adapter.decode(vcard)
306
- contact.postal_addresses[0].id.should eq "910c67f"
306
+ expect(contact.postal_addresses[0].id).to eq "910c67f"
307
307
  end
308
308
 
309
309
  it "should decode the contact's street address" do
@@ -315,7 +315,7 @@ describe Ppl::Adapter::Vcard::Vpim, "#decode" do
315
315
  "END:VCARD",
316
316
  ].join("\n")
317
317
  contact = @adapter.decode(vcard)
318
- contact.postal_addresses[0].street.should eq "1 Testing Road"
318
+ expect(contact.postal_addresses[0].street).to eq "1 Testing Road"
319
319
  end
320
320
 
321
321
  it "should decode the contact's postal code" do
@@ -327,7 +327,7 @@ describe Ppl::Adapter::Vcard::Vpim, "#decode" do
327
327
  "END:VCARD",
328
328
  ].join("\n")
329
329
  contact = @adapter.decode(vcard)
330
- contact.postal_addresses[0].postal_code.should eq "L7 8AA"
330
+ expect(contact.postal_addresses[0].postal_code).to eq "L7 8AA"
331
331
  end
332
332
 
333
333
  it "should decode the contact's po box" do
@@ -339,7 +339,7 @@ describe Ppl::Adapter::Vcard::Vpim, "#decode" do
339
339
  "END:VCARD",
340
340
  ].join("\n")
341
341
  contact = @adapter.decode(vcard)
342
- contact.postal_addresses[0].po_box.should eq "123456"
342
+ expect(contact.postal_addresses[0].po_box).to eq "123456"
343
343
  end
344
344
 
345
345
  it "should decode the contact's locality" do
@@ -351,7 +351,7 @@ describe Ppl::Adapter::Vcard::Vpim, "#decode" do
351
351
  "END:VCARD",
352
352
  ].join("\n")
353
353
  contact = @adapter.decode(vcard)
354
- contact.postal_addresses[0].locality.should eq "Liverpool"
354
+ expect(contact.postal_addresses[0].locality).to eq "Liverpool"
355
355
  end
356
356
 
357
357
  it "should decode the contact's region" do
@@ -363,7 +363,7 @@ describe Ppl::Adapter::Vcard::Vpim, "#decode" do
363
363
  "END:VCARD",
364
364
  ].join("\n")
365
365
  contact = @adapter.decode(vcard)
366
- contact.postal_addresses[0].region.should eq "South West"
366
+ expect(contact.postal_addresses[0].region).to eq "South West"
367
367
  end
368
368
 
369
369
  it "should decode the contact's country" do
@@ -375,7 +375,7 @@ describe Ppl::Adapter::Vcard::Vpim, "#decode" do
375
375
  "END:VCARD",
376
376
  ].join("\n")
377
377
  contact = @adapter.decode(vcard)
378
- contact.postal_addresses[0].country.should eq "UK"
378
+ expect(contact.postal_addresses[0].country).to eq "UK"
379
379
  end
380
380
 
381
381
  end
@@ -389,7 +389,7 @@ describe Ppl::Adapter::Vcard::Vpim, "#decode" do
389
389
  "END:VCARD",
390
390
  ].join("\n")
391
391
  contact = @adapter.decode(vcard)
392
- contact.urls.first.should eq "http://google.com"
392
+ expect(contact.urls.first).to eq "http://google.com"
393
393
  end
394
394
 
395
395
  it "should decode the contact's nickame" do
@@ -401,7 +401,7 @@ describe Ppl::Adapter::Vcard::Vpim, "#decode" do
401
401
  "END:VCARD",
402
402
  ].join("\n")
403
403
  contact = @adapter.decode(vcard)
404
- contact.nicknames.first.should eq "Happy"
404
+ expect(contact.nicknames.first).to eq "Happy"
405
405
  end
406
406
 
407
407
  it "should not choke on utf8" do
@@ -413,7 +413,7 @@ describe Ppl::Adapter::Vcard::Vpim, "#decode" do
413
413
  "END:VCARD",
414
414
  ].join("\n")
415
415
  contact = @adapter.decode(vcard)
416
- contact.name.full.should eq "Straße"
416
+ expect(contact.name.full).to eq "Straße"
417
417
  end
418
418
 
419
419
  end
@@ -1,4 +1,3 @@
1
-
2
1
  describe Ppl::Adapter::Vcard, "#encode" do
3
2
 
4
3
  describe "#encode" do
@@ -1,4 +1,3 @@
1
-
2
1
  describe Ppl::Application::Bootstrap do
3
2
 
4
3
  before(:each) do
@@ -7,30 +6,30 @@ describe Ppl::Application::Bootstrap do
7
6
 
8
7
  describe "#command_add" do
9
8
  it "should return a Ppl::Command::Add" do
10
- @bootstrap.command_add.should be_a(Ppl::Command::Add)
9
+ expect(@bootstrap.command_add).to be_a(Ppl::Command::Add)
11
10
  end
12
11
  end
13
12
 
14
13
  describe "#command_age" do
15
14
  it "should return a Ppl::Command::Age" do
16
- @bootstrap.command_age.should be_a(Ppl::Command::Age)
15
+ expect(@bootstrap.command_age).to be_a(Ppl::Command::Age)
17
16
  end
18
17
  end
19
18
 
20
19
  describe "#command_bday" do
21
20
  it "should return a Ppl::Command::Bday" do
22
- @bootstrap.command_bday.should be_a(Ppl::Command::Bday)
21
+ expect(@bootstrap.command_bday).to be_a(Ppl::Command::Bday)
23
22
  end
24
23
  end
25
24
 
26
25
  describe "#command_completion" do
27
26
  it "should return a Ppl::Command::Completion" do
28
- @bootstrap.command_completion.should be_a(Ppl::Command::Completion)
27
+ expect(@bootstrap.command_completion).to be_a(Ppl::Command::Completion)
29
28
  end
30
29
  it "should inject a completions directory" do
31
- Ppl::Command::Completion.stub(:new) do
30
+ allow(Ppl::Command::Completion).to receive(:new) do
32
31
  completion = double(Ppl::Command::Completion)
33
- completion.should_receive(:completions_directory=)
32
+ expect(completion).to receive(:completions_directory=)
34
33
  completion
35
34
  end
36
35
  @bootstrap.command_completion
@@ -39,141 +38,141 @@ describe Ppl::Application::Bootstrap do
39
38
 
40
39
  describe "#command_email" do
41
40
  it "should return a Ppl::Command::Email" do
42
- @bootstrap.command_email.should be_a(Ppl::Command::Email)
41
+ expect(@bootstrap.command_email).to be_a(Ppl::Command::Email)
43
42
  end
44
43
  end
45
44
 
46
45
  describe "#command_grep" do
47
46
  it "should return a command" do
48
- @bootstrap.command_grep.should be_a(Ppl::Application::Command)
47
+ expect(@bootstrap.command_grep).to be_a(Ppl::Application::Command)
49
48
  end
50
49
  end
51
50
 
52
51
  describe "#command_help" do
53
52
  it "should return a Ppl::Command::Help" do
54
- @bootstrap.command_help.should be_a(Ppl::Command::Help)
53
+ expect(@bootstrap.command_help).to be_a(Ppl::Command::Help)
55
54
  end
56
55
  end
57
56
 
58
57
  describe "#command_init" do
59
58
  it "should return a Ppl::Command::Init" do
60
- @bootstrap.command_init.should be_a(Ppl::Command::Init)
59
+ expect(@bootstrap.command_init).to be_a(Ppl::Command::Init)
61
60
  end
62
61
  end
63
62
 
64
63
  describe "#command_ls" do
65
64
  it "should return a Ppl::Command::Ls" do
66
- @bootstrap.command_ls.should be_a(Ppl::Command::Ls)
65
+ expect(@bootstrap.command_ls).to be_a(Ppl::Command::Ls)
67
66
  end
68
67
  end
69
68
 
70
69
  describe "#command_mutt" do
71
70
  it "should return a Ppl::Command::Mutt" do
72
- @bootstrap.command_mutt.should be_a(Ppl::Command::Mutt)
71
+ expect(@bootstrap.command_mutt).to be_a(Ppl::Command::Mutt)
73
72
  end
74
73
  end
75
74
 
76
75
  describe "#command_mv" do
77
76
  it "should return a Ppl::Command::Mv" do
78
- @bootstrap.command_mv.should be_a(Ppl::Command::Mv)
77
+ expect(@bootstrap.command_mv).to be_a(Ppl::Command::Mv)
79
78
  end
80
79
  end
81
80
 
82
81
  describe "#command_name" do
83
82
  it "should return a Ppl::Command::Name" do
84
- @bootstrap.command_name.should be_a(Ppl::Command::Name)
83
+ expect(@bootstrap.command_name).to be_a(Ppl::Command::Name)
85
84
  end
86
85
  end
87
86
 
88
87
  describe "#command_nick" do
89
88
  it "should return a Ppl::Command::Nick" do
90
- @bootstrap.command_nick.should be_a(Ppl::Command::Nick)
89
+ expect(@bootstrap.command_nick).to be_a(Ppl::Command::Nick)
91
90
  end
92
91
  end
93
92
 
94
93
  describe "#command_org" do
95
94
  it "should return a Ppl::Command::Org" do
96
- @bootstrap.command_org.should be_a(Ppl::Command::Org)
95
+ expect(@bootstrap.command_org).to be_a(Ppl::Command::Org)
97
96
  end
98
97
  end
99
98
 
100
99
  describe "#command_phone" do
101
100
  it "should return a Ppl::Command::Phone" do
102
- @bootstrap.command_phone.should be_a(Ppl::Command::Phone)
101
+ expect(@bootstrap.command_phone).to be_a(Ppl::Command::Phone)
103
102
  end
104
103
  end
105
104
 
106
105
  describe "#command_post" do
107
106
  it "should return a Ppl::Command::Post" do
108
- @bootstrap.command_post.should be_a(Ppl::Command::Post)
107
+ expect(@bootstrap.command_post).to be_a(Ppl::Command::Post)
109
108
  end
110
109
  end
111
110
 
112
111
  describe "#command_pull" do
113
112
  it "should return a command" do
114
- @bootstrap.command_pull.should be_a(Ppl::Application::Command)
113
+ expect(@bootstrap.command_pull).to be_a(Ppl::Application::Command)
115
114
  end
116
115
  end
117
116
 
118
117
  describe "#command_push" do
119
118
  it "should return a command" do
120
- @bootstrap.command_push.should be_a(Ppl::Application::Command)
119
+ expect(@bootstrap.command_push).to be_a(Ppl::Application::Command)
121
120
  end
122
121
  end
123
122
 
124
123
  describe "#command_remote" do
125
124
  it "should return a command" do
126
- @bootstrap.command_remote.should be_a(Ppl::Application::Command)
125
+ expect(@bootstrap.command_remote).to be_a(Ppl::Application::Command)
127
126
  end
128
127
  end
129
128
 
130
129
  describe "#command_rm" do
131
130
  it "should return a Ppl::Command::Rm" do
132
- @bootstrap.command_rm.should be_a(Ppl::Command::Rm)
131
+ expect(@bootstrap.command_rm).to be_a(Ppl::Command::Rm)
133
132
  end
134
133
  end
135
134
 
136
135
  describe "#command_scrape" do
137
136
  it "should return a Ppl::Command::Scrape" do
138
- @bootstrap.command_scrape.should be_a(Ppl::Command::Scrape)
137
+ expect(@bootstrap.command_scrape).to be_a(Ppl::Command::Scrape)
139
138
  end
140
139
  end
141
140
 
142
141
  describe "#command_shell" do
143
142
  it "should return a Ppl::Command::Shell" do
144
- @bootstrap.command_shell.should be_a(Ppl::Command::Shell)
143
+ expect(@bootstrap.command_shell).to be_a(Ppl::Command::Shell)
145
144
  end
146
145
  end
147
146
 
148
147
  describe "#command_show" do
149
148
  it "should return a Ppl::Command::Show" do
150
- @bootstrap.command_show.should be_a(Ppl::Command::Show)
149
+ expect(@bootstrap.command_show).to be_a(Ppl::Command::Show)
151
150
  end
152
151
  end
153
152
 
154
153
  describe "#command_url" do
155
154
  it "should return a Ppl::Command::Url" do
156
- @bootstrap.command_url.should be_a(Ppl::Command::Url)
155
+ expect(@bootstrap.command_url).to be_a(Ppl::Command::Url)
157
156
  end
158
157
  end
159
158
 
160
159
  describe "#command_version" do
161
160
  it "should return a Ppl::Command::Version" do
162
- @bootstrap.command_version.should be_a(Ppl::Command::Version)
161
+ expect(@bootstrap.command_version).to be_a(Ppl::Command::Version)
163
162
  end
164
163
  end
165
164
 
166
165
  describe "#format_address_book_ages" do
167
166
 
168
167
  it "should return a Ppl::Format::AddressBook::Ages" do
169
- @bootstrap.format_address_book_ages.should be_a(Ppl::Format::AddressBook::Ages)
168
+ expect(@bootstrap.format_address_book_ages).to be_a(Ppl::Format::AddressBook::Ages)
170
169
  end
171
170
 
172
171
  it "should set up colored output if configured to do so" do
173
172
  @colors = {}
174
173
  @config = double(Ppl::Application::Configuration)
175
- @bootstrap.stub(:configuration).and_return(@config)
176
- @config.should_receive(:command_colors).with("age").and_return(@colors)
174
+ allow(@bootstrap).to receive(:configuration).and_return(@config)
175
+ expect(@config).to receive(:command_colors).with("age").and_return(@colors)
177
176
  @bootstrap.format_address_book_ages
178
177
  end
179
178
 
@@ -181,369 +180,369 @@ describe Ppl::Application::Bootstrap do
181
180
 
182
181
  describe "#format_address_book_birthdays" do
183
182
  it "should return a Ppl::Format::AddressBook::Birthdays" do
184
- @bootstrap.format_address_book_birthdays.should be_a(Ppl::Format::AddressBook::Birthdays)
183
+ expect(@bootstrap.format_address_book_birthdays).to be_a(Ppl::Format::AddressBook::Birthdays)
185
184
  end
186
185
 
187
186
  it "should set up colored output if configured to do so" do
188
187
  @colors = {}
189
188
  @config = double(Ppl::Application::Configuration)
190
- @bootstrap.stub(:configuration).and_return(@config)
191
- @config.should_receive(:command_colors).with("bday").and_return(@colors)
189
+ allow(@bootstrap).to receive(:configuration).and_return(@config)
190
+ expect(@config).to receive(:command_colors).with("bday").and_return(@colors)
192
191
  @bootstrap.format_address_book_birthdays
193
192
  end
194
193
  end
195
194
 
196
195
  describe "#format_address_book_email_addresses" do
197
196
  it "should return a Ppl::Format::AddressBook::EmailAddresses" do
198
- @bootstrap.format_address_book_email_addresses.should be_a(Ppl::Format::AddressBook::EmailAddresses)
197
+ expect(@bootstrap.format_address_book_email_addresses).to be_a(Ppl::Format::AddressBook::EmailAddresses)
199
198
  end
200
199
  it "should set up colored output if configured to do so" do
201
200
  @colors = {}
202
201
  @config = double(Ppl::Application::Configuration)
203
- @bootstrap.stub(:configuration).and_return(@config)
204
- @config.should_receive(:command_colors).with("email").and_return(@colors)
202
+ allow(@bootstrap).to receive(:configuration).and_return(@config)
203
+ expect(@config).to receive(:command_colors).with("email").and_return(@colors)
205
204
  @bootstrap.format_address_book_email_addresses
206
205
  end
207
206
  end
208
207
 
209
208
  describe "#format_address_book_mutt_query" do
210
209
  it "should return a Ppl::Format::AddressBook::MuttQuery" do
211
- @bootstrap.format_address_book_mutt_query.should be_a(Ppl::Format::AddressBook::MuttQuery)
210
+ expect(@bootstrap.format_address_book_mutt_query).to be_a(Ppl::Format::AddressBook::MuttQuery)
212
211
  end
213
212
  end
214
213
 
215
214
  describe "#format_address_book_organizations" do
216
215
  it "should return a Ppl::Format::AddressBook::Organizations" do
217
- @bootstrap.format_address_book_organizations.should be_a(Ppl::Format::AddressBook::Organizations)
216
+ expect(@bootstrap.format_address_book_organizations).to be_a(Ppl::Format::AddressBook::Organizations)
218
217
  end
219
218
  it "should set up colored output if configured to do so" do
220
219
  @colors = {}
221
220
  @config = double(Ppl::Application::Configuration)
222
- @bootstrap.stub(:configuration).and_return(@config)
223
- @config.should_receive(:command_colors).with("org").and_return(@colors)
221
+ allow(@bootstrap).to receive(:configuration).and_return(@config)
222
+ expect(@config).to receive(:command_colors).with("org").and_return(@colors)
224
223
  @bootstrap.format_address_book_organizations
225
224
  end
226
225
  end
227
226
 
228
227
  describe "#format_address_book_names" do
229
228
  it "should return a Ppl::Format::AddressBook::Names" do
230
- @bootstrap.format_address_book_names.should be_a(Ppl::Format::AddressBook::Names)
229
+ expect(@bootstrap.format_address_book_names).to be_a(Ppl::Format::AddressBook::Names)
231
230
  end
232
231
  it "should set up colored output if configured to do so" do
233
232
  @colors = {}
234
233
  @config = double(Ppl::Application::Configuration)
235
- @bootstrap.stub(:configuration).and_return(@config)
236
- @config.should_receive(:command_colors).with("name").and_return(@colors)
234
+ allow(@bootstrap).to receive(:configuration).and_return(@config)
235
+ expect(@config).to receive(:command_colors).with("name").and_return(@colors)
237
236
  @bootstrap.format_address_book_names
238
237
  end
239
238
  end
240
239
 
241
240
  describe "#format_address_book_nicknames" do
242
241
  it "should return a Ppl::Format::AddressBook::Nicknames" do
243
- @bootstrap.format_address_book_nicknames.should be_a(Ppl::Format::AddressBook::Nicknames)
242
+ expect(@bootstrap.format_address_book_nicknames).to be_a(Ppl::Format::AddressBook::Nicknames)
244
243
  end
245
244
  it "should set up colored output if configured to do so" do
246
245
  @colors = {}
247
246
  @config = double(Ppl::Application::Configuration)
248
- @bootstrap.stub(:configuration).and_return(@config)
249
- @config.should_receive(:command_colors).with("nick").and_return(@colors)
247
+ allow(@bootstrap).to receive(:configuration).and_return(@config)
248
+ expect(@config).to receive(:command_colors).with("nick").and_return(@colors)
250
249
  @bootstrap.format_address_book_nicknames
251
250
  end
252
251
  end
253
252
 
254
253
  describe "#format_address_book_one_line" do
255
254
  it "should return a Ppl::Format::AddressBook::OneLine" do
256
- @bootstrap.format_address_book_one_line.should be_a(Ppl::Format::AddressBook::OneLine)
255
+ expect(@bootstrap.format_address_book_one_line).to be_a(Ppl::Format::AddressBook::OneLine)
257
256
  end
258
257
  it "should set up colored output if configured to do so" do
259
258
  @colors = {}
260
259
  @config = double(Ppl::Application::Configuration)
261
- @bootstrap.stub(:configuration).and_return(@config)
262
- @config.should_receive(:command_colors).with("ls").and_return(@colors)
260
+ allow(@bootstrap).to receive(:configuration).and_return(@config)
261
+ expect(@config).to receive(:command_colors).with("ls").and_return(@colors)
263
262
  @bootstrap.format_address_book_one_line
264
263
  end
265
264
  end
266
265
 
267
266
  describe "#format_address_book_phone_numbers" do
268
267
  it "should return a Ppl::Format::Address_book::PhoneNumbers" do
269
- @bootstrap.format_address_book_phone_numbers.should be_a(Ppl::Format::AddressBook::PhoneNumbers)
268
+ expect(@bootstrap.format_address_book_phone_numbers).to be_a(Ppl::Format::AddressBook::PhoneNumbers)
270
269
  end
271
270
  it "should set up colored output if configured to do so" do
272
271
  @colors = {}
273
272
  @config = double(Ppl::Application::Configuration)
274
- @bootstrap.stub(:configuration).and_return(@config)
275
- @config.should_receive(:command_colors).with("phone").and_return(@colors)
273
+ allow(@bootstrap).to receive(:configuration).and_return(@config)
274
+ expect(@config).to receive(:command_colors).with("phone").and_return(@colors)
276
275
  @bootstrap.format_address_book_phone_numbers
277
276
  end
278
277
  end
279
278
 
280
279
  describe "#format_address_book_postal_addresses" do
281
280
  it "should return a Ppl::Format::AddressBook::PostalAddresses" do
282
- @bootstrap.format_address_book_postal_addresses.should be_a(Ppl::Format::AddressBook::PostalAddresses)
281
+ expect(@bootstrap.format_address_book_postal_addresses).to be_a(Ppl::Format::AddressBook::PostalAddresses)
283
282
  end
284
283
  it "should set up colored output if configured to do so" do
285
284
  @colors = {}
286
285
  @config = double(Ppl::Application::Configuration)
287
- @bootstrap.stub(:configuration).and_return(@config)
288
- @config.should_receive(:command_colors).with("post").and_return(@colors)
286
+ allow(@bootstrap).to receive(:configuration).and_return(@config)
287
+ expect(@config).to receive(:command_colors).with("post").and_return(@colors)
289
288
  @bootstrap.format_address_book_postal_addresses
290
289
  end
291
290
  end
292
291
 
293
292
  describe "#format_address_book_urls" do
294
293
  it "should return a Ppl::Format::AddressBook::Urls" do
295
- @bootstrap.format_address_book_urls.should be_a(Ppl::Format::AddressBook::Urls)
294
+ expect(@bootstrap.format_address_book_urls).to be_a(Ppl::Format::AddressBook::Urls)
296
295
  end
297
296
  it "should set up colored output if configured to do so" do
298
297
  @colors = {}
299
298
  @config = double(Ppl::Application::Configuration)
300
- @bootstrap.stub(:configuration).and_return(@config)
301
- @config.should_receive(:command_colors).with("url").and_return(@colors)
299
+ allow(@bootstrap).to receive(:configuration).and_return(@config)
300
+ expect(@config).to receive(:command_colors).with("url").and_return(@colors)
302
301
  @bootstrap.format_address_book_urls
303
302
  end
304
303
  end
305
304
 
306
305
  describe "#format_contact_age" do
307
306
  it "should return a Ppl::Format::Contact::Age" do
308
- @bootstrap.format_contact_age.should be_a(Ppl::Format::Contact::Age)
307
+ expect(@bootstrap.format_contact_age).to be_a(Ppl::Format::Contact::Age)
309
308
  end
310
309
  it "should set up colored output if configured to do so" do
311
310
  @colors = {}
312
311
  @config = double(Ppl::Application::Configuration)
313
- @bootstrap.stub(:configuration).and_return(@config)
314
- @config.should_receive(:command_colors).with("age").and_return(@colors)
312
+ allow(@bootstrap).to receive(:configuration).and_return(@config)
313
+ expect(@config).to receive(:command_colors).with("age").and_return(@colors)
315
314
  @bootstrap.format_contact_age
316
315
  end
317
316
  end
318
317
 
319
318
  describe "#format_contact_birthday" do
320
319
  it "should return a Ppl::Format::Contact::Birthday" do
321
- @bootstrap.format_contact_birthday.should be_a(Ppl::Format::Contact::Birthday)
320
+ expect(@bootstrap.format_contact_birthday).to be_a(Ppl::Format::Contact::Birthday)
322
321
  end
323
322
  it "should set up colored output if configured to do so" do
324
323
  @colors = {}
325
324
  @config = double(Ppl::Application::Configuration)
326
- @bootstrap.stub(:configuration).and_return(@config)
327
- @config.should_receive(:command_colors).with("bday").and_return(@colors)
325
+ allow(@bootstrap).to receive(:configuration).and_return(@config)
326
+ expect(@config).to receive(:command_colors).with("bday").and_return(@colors)
328
327
  @bootstrap.format_contact_birthday
329
328
  end
330
329
  end
331
330
 
332
331
  describe "#format_contact_email_addresses" do
333
332
  it "should return a Ppl::Format::Contact::EmailAddresses" do
334
- @bootstrap.format_contact_email_addresses.should be_a(Ppl::Format::Contact::EmailAddresses)
333
+ expect(@bootstrap.format_contact_email_addresses).to be_a(Ppl::Format::Contact::EmailAddresses)
335
334
  end
336
335
  it "should set up colored output if configured to do so" do
337
336
  @colors = {}
338
337
  @config = double(Ppl::Application::Configuration)
339
- @bootstrap.stub(:configuration).and_return(@config)
340
- @config.should_receive(:command_colors).with("email").and_return(@colors)
338
+ allow(@bootstrap).to receive(:configuration).and_return(@config)
339
+ expect(@config).to receive(:command_colors).with("email").and_return(@colors)
341
340
  @bootstrap.format_contact_email_addresses
342
341
  end
343
342
  end
344
343
 
345
344
  describe "#format_name_full_only" do
346
345
  it "should return a Ppl::Format::Contact::Name" do
347
- @bootstrap.format_name_full_only.should be_a(Ppl::Format::Name::FullOnly)
346
+ expect(@bootstrap.format_name_full_only).to be_a(Ppl::Format::Name::FullOnly)
348
347
  end
349
348
  it "should set up colored output if configured to do so" do
350
349
  @colors = {}
351
350
  @config = double(Ppl::Application::Configuration)
352
- @bootstrap.stub(:configuration).and_return(@config)
353
- @config.should_receive(:command_colors).with("name").and_return(@colors)
351
+ allow(@bootstrap).to receive(:configuration).and_return(@config)
352
+ expect(@config).to receive(:command_colors).with("name").and_return(@colors)
354
353
  @bootstrap.format_name_full_only
355
354
  end
356
355
  end
357
356
 
358
357
  describe "#format_contact_nicknames" do
359
358
  it "should return a Ppl::Format::Contact::Nicknames" do
360
- @bootstrap.format_contact_nicknames.should be_a(Ppl::Format::Contact::Nicknames)
359
+ expect(@bootstrap.format_contact_nicknames).to be_a(Ppl::Format::Contact::Nicknames)
361
360
  end
362
361
  it "should set up colored output if configured to do so" do
363
362
  @colors = {}
364
363
  @config = double(Ppl::Application::Configuration)
365
- @bootstrap.stub(:configuration).and_return(@config)
366
- @config.should_receive(:command_colors).with("nick").and_return(@colors)
364
+ allow(@bootstrap).to receive(:configuration).and_return(@config)
365
+ expect(@config).to receive(:command_colors).with("nick").and_return(@colors)
367
366
  @bootstrap.format_contact_nicknames
368
367
  end
369
368
  end
370
369
 
371
370
  describe "#format_contact_organizations" do
372
371
  it "should return a Ppl::Format::Contact::Organizations" do
373
- @bootstrap.format_contact_organizations.should be_a(Ppl::Format::Contact::Organization)
372
+ expect(@bootstrap.format_contact_organizations).to be_a(Ppl::Format::Contact::Organization)
374
373
  end
375
374
  it "should set up colored output if configured to do so" do
376
375
  @colors = {}
377
376
  @config = double(Ppl::Application::Configuration)
378
- @bootstrap.stub(:configuration).and_return(@config)
379
- @config.should_receive(:command_colors).with("org").and_return(@colors)
377
+ allow(@bootstrap).to receive(:configuration).and_return(@config)
378
+ expect(@config).to receive(:command_colors).with("org").and_return(@colors)
380
379
  @bootstrap.format_contact_organizations
381
380
  end
382
381
  end
383
382
 
384
383
  describe "#format_contact_phone_numbers" do
385
384
  it "should return a Ppl::Format::Contact::PhoneNumber" do
386
- @bootstrap.format_contact_phone_numbers.should be_a(Ppl::Format::Contact::PhoneNumber)
385
+ expect(@bootstrap.format_contact_phone_numbers).to be_a(Ppl::Format::Contact::PhoneNumber)
387
386
  end
388
387
  it "should set up colored output if configured to do so" do
389
388
  @colors = {}
390
389
  @config = double(Ppl::Application::Configuration)
391
- @bootstrap.stub(:configuration).and_return(@config)
392
- @config.should_receive(:command_colors).with("phone").and_return(@colors)
390
+ allow(@bootstrap).to receive(:configuration).and_return(@config)
391
+ expect(@config).to receive(:command_colors).with("phone").and_return(@colors)
393
392
  @bootstrap.format_contact_phone_numbers
394
393
  end
395
394
  end
396
395
 
397
396
  describe "#format_contact_postal_addresses" do
398
397
  it "should return a Ppl::Format::Contact::PostalAddresses" do
399
- @bootstrap.format_contact_postal_addresses.should be_a(Ppl::Format::Contact::PostalAddresses)
398
+ expect(@bootstrap.format_contact_postal_addresses).to be_a(Ppl::Format::Contact::PostalAddresses)
400
399
  end
401
400
  end
402
401
 
403
402
  describe "#format_contact_urls" do
404
403
  it "should return a Ppl::Format::Contact::Urls" do
405
- @bootstrap.format_contact_urls.should be_a(Ppl::Format::Contact::Urls)
404
+ expect(@bootstrap.format_contact_urls).to be_a(Ppl::Format::Contact::Urls)
406
405
  end
407
406
  it "should set up colored output if configured to do so" do
408
407
  @colors = {}
409
408
  @config = double(Ppl::Application::Configuration)
410
- @bootstrap.stub(:configuration).and_return(@config)
411
- @config.should_receive(:command_colors).with("url").and_return(@colors)
409
+ allow(@bootstrap).to receive(:configuration).and_return(@config)
410
+ expect(@config).to receive(:command_colors).with("url").and_return(@colors)
412
411
  @bootstrap.format_contact_urls
413
412
  end
414
413
  end
415
414
 
416
415
  describe "#format_postal_address_multi_line" do
417
416
  it "should return a Ppl::Format::PostalAddress::MultiLine" do
418
- @bootstrap.format_postal_address_multi_line.should be_a(Ppl::Format::PostalAddress::MultiLine)
417
+ expect(@bootstrap.format_postal_address_multi_line).to be_a(Ppl::Format::PostalAddress::MultiLine)
419
418
  end
420
419
  end
421
420
 
422
421
  describe "#command_suite" do
423
422
 
424
423
  before(:each) do
425
- @bootstrap.stub(:storage_adapter)
424
+ allow(@bootstrap).to receive(:storage_adapter)
426
425
  end
427
426
 
428
427
  it "should return a Ppl::Application::CommandSuite" do
429
- @bootstrap.command_suite.should be_a(Ppl::Application::CommandSuite)
428
+ expect(@bootstrap.command_suite).to be_a(Ppl::Application::CommandSuite)
430
429
  end
431
430
  it "should contain the 'add' command" do
432
- @bootstrap.command_suite.find_command("add").should_not be nil
431
+ expect(@bootstrap.command_suite.find_command("add")).not_to be nil
433
432
  end
434
433
  it "should contain the 'age' command" do
435
- @bootstrap.command_suite.find_command("age").should_not be nil
434
+ expect(@bootstrap.command_suite.find_command("age")).not_to be nil
436
435
  end
437
436
  it "should contain the 'bday' command" do
438
- @bootstrap.command_suite.find_command("bday").should_not be nil
437
+ expect(@bootstrap.command_suite.find_command("bday")).not_to be nil
439
438
  end
440
439
  it "should contain the 'completion' command" do
441
- @bootstrap.command_suite.find_command("completion").should_not be nil
440
+ expect(@bootstrap.command_suite.find_command("completion")).not_to be nil
442
441
  end
443
442
  it "should contain the 'email' command" do
444
- @bootstrap.command_suite.find_command("email").should_not be nil
443
+ expect(@bootstrap.command_suite.find_command("email")).not_to be nil
445
444
  end
446
445
  it "should contain the 'grep' command" do
447
- @bootstrap.command_suite.find_command("grep").should_not be nil
446
+ expect(@bootstrap.command_suite.find_command("grep")).not_to be nil
448
447
  end
449
448
  it "should contain the 'init' command" do
450
- @bootstrap.command_suite.find_command("init").should_not be nil
449
+ expect(@bootstrap.command_suite.find_command("init")).not_to be nil
451
450
  end
452
451
  it "should contain the 'ls' command" do
453
- @bootstrap.command_suite.find_command("ls").should_not be nil
452
+ expect(@bootstrap.command_suite.find_command("ls")).not_to be nil
454
453
  end
455
454
  it "should contain the 'mutt' command" do
456
- @bootstrap.command_suite.find_command("mutt").should_not be nil
455
+ expect(@bootstrap.command_suite.find_command("mutt")).not_to be nil
457
456
  end
458
457
  it "should contain the 'mv' command" do
459
- @bootstrap.command_suite.find_command("mv").should_not be nil
458
+ expect(@bootstrap.command_suite.find_command("mv")).not_to be nil
460
459
  end
461
460
  it "should contain the 'name' command" do
462
- @bootstrap.command_suite.find_command("name").should_not be nil
461
+ expect(@bootstrap.command_suite.find_command("name")).not_to be nil
463
462
  end
464
463
  it "should contain the 'nick' command" do
465
- @bootstrap.command_suite.find_command("nick").should_not be nil
464
+ expect(@bootstrap.command_suite.find_command("nick")).not_to be nil
466
465
  end
467
466
  it "should contain the 'org' command" do
468
- @bootstrap.command_suite.find_command("org").should_not be nil
467
+ expect(@bootstrap.command_suite.find_command("org")).not_to be nil
469
468
  end
470
469
  it "should contain the 'phone' command" do
471
- @bootstrap.command_suite.find_command("phone").should_not be nil
470
+ expect(@bootstrap.command_suite.find_command("phone")).not_to be nil
472
471
  end
473
472
  it "should contain the 'post' command" do
474
- @bootstrap.command_suite.find_command("post").should_not be nil
473
+ expect(@bootstrap.command_suite.find_command("post")).not_to be nil
475
474
  end
476
475
  it "should contain the 'pull' command" do
477
- @bootstrap.command_suite.find_command("pull").should_not be nil
476
+ expect(@bootstrap.command_suite.find_command("pull")).not_to be nil
478
477
  end
479
478
  it "should contain the 'push' command" do
480
- @bootstrap.command_suite.find_command("push").should_not be nil
479
+ expect(@bootstrap.command_suite.find_command("push")).not_to be nil
481
480
  end
482
481
  it "should contain the 'remote' command" do
483
- @bootstrap.command_suite.find_command("remote").should_not be nil
482
+ expect(@bootstrap.command_suite.find_command("remote")).not_to be nil
484
483
  end
485
484
  it "should contain the 'rm' command" do
486
- @bootstrap.command_suite.find_command("rm").should_not be nil
485
+ expect(@bootstrap.command_suite.find_command("rm")).not_to be nil
487
486
  end
488
487
  it "should contain the 'scrape' command" do
489
- @bootstrap.command_suite.find_command("scrape").should_not be nil
488
+ expect(@bootstrap.command_suite.find_command("scrape")).not_to be nil
490
489
  end
491
490
  it "should contain the 'show' command" do
492
- @bootstrap.command_suite.find_command("show").should_not be nil
491
+ expect(@bootstrap.command_suite.find_command("show")).not_to be nil
493
492
  end
494
493
  it "should contain the 'help' command" do
495
- @bootstrap.command_suite.find_command("help").should_not be nil
494
+ expect(@bootstrap.command_suite.find_command("help")).not_to be nil
496
495
  end
497
496
  it "should contain the 'shell' command" do
498
- @bootstrap.command_suite.find_command("shell").should_not be nil
497
+ expect(@bootstrap.command_suite.find_command("shell")).not_to be nil
499
498
  end
500
499
  it "should contain the 'url' command" do
501
- @bootstrap.command_suite.find_command("url").should_not be nil
500
+ expect(@bootstrap.command_suite.find_command("url")).not_to be nil
502
501
  end
503
502
  it "should contain the 'version' command" do
504
- @bootstrap.command_suite.find_command("version").should_not be nil
503
+ expect(@bootstrap.command_suite.find_command("version")).not_to be nil
505
504
  end
506
505
  end
507
506
 
508
507
  describe "#configuration" do
509
508
  it "should return a Ppl::Application::Configuration" do
510
- @bootstrap.configuration.should be_a(Ppl::Application::Configuration)
509
+ expect(@bootstrap.configuration).to be_a(Ppl::Application::Configuration)
511
510
  end
512
511
  end
513
512
 
514
513
  describe "#input" do
515
514
  it "should return a Ppl::Application::Input" do
516
- @bootstrap.input.should be_a(Ppl::Application::Input)
515
+ expect(@bootstrap.input).to be_a(Ppl::Application::Input)
517
516
  end
518
517
  end
519
518
 
520
519
  describe "#output" do
521
520
  it "should return a Ppl::Application::Output" do
522
- @bootstrap.output.should be_a(Ppl::Application::Output)
521
+ expect(@bootstrap.output).to be_a(Ppl::Application::Output)
523
522
  end
524
523
  end
525
524
 
526
525
  describe "#router" do
527
526
  before(:each) do
528
- @bootstrap.stub(:storage_adapter)
527
+ allow(@bootstrap).to receive(:storage_adapter)
529
528
  end
530
529
  it "should return a Ppl::Application::Router" do
531
- @bootstrap.router.should be_a(Ppl::Application::Router)
530
+ expect(@bootstrap.router).to be_a(Ppl::Application::Router)
532
531
  end
533
532
  it "should set the 'help' command as the default" do
534
- @bootstrap.router.default.should eq "help"
533
+ expect(@bootstrap.router.default).to eq "help"
535
534
  end
536
535
  it "should inject the user's aliases" do
537
- @bootstrap.router.aliases.should be_a(Hash)
536
+ expect(@bootstrap.router.aliases).to be_a(Hash)
538
537
  end
539
538
  end
540
539
 
541
540
  describe "#shell" do
542
541
  before(:each) do
543
- @bootstrap.stub(:storage_adapter)
542
+ allow(@bootstrap).to receive(:storage_adapter)
544
543
  end
545
544
  it "should return a Ppl::Application::Shell" do
546
- @bootstrap.shell.should be_a(Ppl::Application::Shell)
545
+ expect(@bootstrap.shell).to be_a(Ppl::Application::Shell)
547
546
  end
548
547
  end
549
548
 
@@ -551,32 +550,32 @@ describe Ppl::Application::Bootstrap do
551
550
  before(:each) do
552
551
  @config = double(Ppl::Application::Configuration)
553
552
  @factory = double(Ppl::Adapter::Storage::Factory)
554
- @bootstrap.stub(:configuration).and_return(@config)
555
- Ppl::Adapter::Storage::Factory.stub(:new).and_return(@factory)
553
+ allow(@bootstrap).to receive(:configuration).and_return(@config)
554
+ allow(Ppl::Adapter::Storage::Factory).to receive(:new).and_return(@factory)
556
555
 
557
- @config.should_receive(:address_book_path).and_return("/tmp")
558
- @factory.should_receive(:load_adapter).and_return(Ppl::Adapter::Storage::Disk.new(nil))
556
+ expect(@config).to receive(:address_book_path).and_return("/tmp")
557
+ expect(@factory).to receive(:load_adapter).and_return(Ppl::Adapter::Storage::Disk.new(nil))
559
558
  end
560
559
  it "should return a Ppl::Adapter::Storage" do
561
- @bootstrap.storage_adapter.should be_a(Ppl::Adapter::Storage)
560
+ expect(@bootstrap.storage_adapter).to be_a(Ppl::Adapter::Storage)
562
561
  end
563
562
  end
564
563
 
565
564
  describe "#vcard_adapter" do
566
565
  it "should return a Ppl::Adapter::Vcard::Vpim" do
567
- @bootstrap.vcard_adapter.should be_a(Ppl::Adapter::Vcard::Vpim)
566
+ expect(@bootstrap.vcard_adapter).to be_a(Ppl::Adapter::Vcard::Vpim)
568
567
  end
569
568
  end
570
569
 
571
570
  describe "#name_service" do
572
571
  it "should return a Ppl::Service::Name" do
573
- @bootstrap.name_service.should be_a(Ppl::Service::Name)
572
+ expect(@bootstrap.name_service).to be_a(Ppl::Service::Name)
574
573
  end
575
574
  end
576
575
 
577
576
  describe "#postal_address_service" do
578
577
  it "should return a Ppl::Service::PostalAddress" do
579
- @bootstrap.postal_address_service.should be_a(Ppl::Service::PostalAddress)
578
+ expect(@bootstrap.postal_address_service).to be_a(Ppl::Service::PostalAddress)
580
579
  end
581
580
  end
582
581