adva 0.3.3 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (957) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +60 -0
  3. data/.gitignore +3 -0
  4. data/.rspec +3 -0
  5. data/.ruby-gemset +1 -0
  6. data/.ruby-version +1 -0
  7. data/AGENTS.md +41 -0
  8. data/Appraisals +4 -0
  9. data/CHANGELOG +1 -1
  10. data/CLAUDE.md +79 -0
  11. data/Gemfile +1 -2
  12. data/README.md +203 -0
  13. data/Rakefile +30 -0
  14. data/adva.gemspec +22 -5
  15. data/app/assets/javascripts/adva_cms.js +1 -0
  16. data/app/assets/stylesheets/adva_cms/layout/login.scss +1 -1
  17. data/app/controllers/admin/articles_controller.rb +3 -0
  18. data/app/controllers/admin/base_controller.rb +1 -9
  19. data/app/controllers/admin/ckeditor_controller.rb +11 -0
  20. data/app/controllers/admin/page/articles_controller.rb +26 -53
  21. data/app/controllers/admin/page/categories_controller.rb +28 -11
  22. data/app/controllers/admin/page/contents_controller.rb +5 -14
  23. data/app/controllers/admin/page/links_controller.rb +13 -16
  24. data/app/controllers/admin/sections_controller.rb +15 -10
  25. data/app/controllers/admin/sites_controller.rb +38 -15
  26. data/app/controllers/admin/users_controller.rb +14 -8
  27. data/app/controllers/articles_controller.rb +3 -3
  28. data/app/controllers/base_controller.rb +2 -5
  29. data/app/controllers/password_controller.rb +24 -8
  30. data/app/controllers/session_controller.rb +18 -8
  31. data/app/helpers/activities_helper.rb +4 -20
  32. data/app/helpers/admin/base_helper.rb +3 -3
  33. data/app/helpers/base_helper.rb +16 -16
  34. data/app/helpers/content_helper.rb +16 -16
  35. data/app/helpers/resource_helper.rb +9 -9
  36. data/app/helpers/users_helper.rb +3 -3
  37. data/app/models/activity.rb +4 -4
  38. data/app/models/article.rb +3 -1
  39. data/app/models/categorization.rb +1 -1
  40. data/app/models/category.rb +6 -6
  41. data/app/models/content.rb +66 -23
  42. data/app/models/page.rb +3 -3
  43. data/app/models/password_mailer.rb +8 -8
  44. data/app/models/section.rb +17 -16
  45. data/app/models/site.rb +15 -26
  46. data/app/models/tag.rb +5 -0
  47. data/app/models/user.rb +43 -18
  48. data/app/models/user_session.rb +19 -0
  49. data/app/views/admin/activities/_activities.html.slim +15 -0
  50. data/app/views/admin/activities/_comment.html.slim +25 -0
  51. data/app/views/admin/activities/_content.html.slim +17 -0
  52. data/app/views/admin/activities/_topic.html.slim +17 -0
  53. data/app/views/admin/page/articles/_form.html.slim +40 -0
  54. data/app/views/admin/page/articles/_options.html.slim +9 -0
  55. data/app/views/admin/page/articles/edit.html.slim +11 -0
  56. data/app/views/admin/page/articles/new.html.slim +9 -0
  57. data/app/views/admin/page/categories/edit.html.slim +15 -0
  58. data/app/views/admin/page/categories/index.html.slim +14 -0
  59. data/app/views/admin/page/categories/new.html.slim +14 -0
  60. data/app/views/admin/page/contents/index.html.slim +18 -0
  61. data/app/views/admin/page/links/_form.html.slim +18 -0
  62. data/app/views/admin/page/links/_options.html.slim +8 -0
  63. data/app/views/admin/page/links/edit.html.slim +9 -0
  64. data/app/views/admin/page/links/new.html.slim +9 -0
  65. data/app/views/admin/sections/_form.html.slim +22 -0
  66. data/app/views/admin/sections/edit.html.slim +6 -0
  67. data/app/views/admin/sections/index.html.slim +17 -0
  68. data/app/views/admin/sections/new.html.slim +22 -0
  69. data/app/views/admin/sections/settings/_page.html.slim +9 -0
  70. data/app/views/admin/shared/_header.html.slim +16 -0
  71. data/app/views/admin/shared/_section.html.slim +5 -0
  72. data/app/views/admin/shared/_section_tree.html.slim +15 -0
  73. data/app/views/admin/sites/_email_notifications.html.slim +7 -0
  74. data/app/views/admin/sites/_form.html.slim +12 -0
  75. data/app/views/admin/sites/_recent_users.html.slim +11 -0
  76. data/app/views/admin/sites/_sections.html.slim +6 -0
  77. data/app/views/admin/sites/_unapproved_comments.html.slim +7 -0
  78. data/app/views/admin/sites/edit.html.slim +3 -0
  79. data/app/views/admin/sites/index.html.slim +13 -0
  80. data/app/views/admin/sites/multi_sites_disabled.html.slim +11 -0
  81. data/app/views/admin/sites/new.html.slim +18 -0
  82. data/app/views/admin/sites/show.html.slim +11 -0
  83. data/app/views/admin/users/_form.html.slim +12 -0
  84. data/app/views/admin/users/_sidebar.html.slim +4 -0
  85. data/app/views/admin/users/edit.html.slim +6 -0
  86. data/app/views/admin/users/index.html.slim +13 -0
  87. data/app/views/admin/users/new.html.slim +4 -0
  88. data/app/views/admin/users/show.html.slim +23 -0
  89. data/app/views/categories/_checkboxes.html.slim +9 -0
  90. data/app/views/comments/_form.html.slim +3 -0
  91. data/app/views/comments/_list.html.slim +3 -0
  92. data/app/views/layouts/admin.html.slim +50 -0
  93. data/app/views/layouts/application.html.slim +7 -0
  94. data/app/views/layouts/login.html.slim +23 -0
  95. data/app/views/pages/articles/index.html.slim +8 -0
  96. data/app/views/pages/articles/show.html.slim +14 -0
  97. data/app/views/password/edit.html.slim +19 -0
  98. data/app/views/password/new.html.slim +10 -0
  99. data/app/views/password_mailer/reset_password_email.html.slim +21 -0
  100. data/app/views/password_mailer/updated_password_email.html.slim +3 -0
  101. data/app/views/session/new.html.slim +14 -0
  102. data/app/views/shared/_flash.html.slim +2 -0
  103. data/app/views/shared/_menu.html.slim +6 -0
  104. data/app/views/shared/_sidebar.html.slim +14 -0
  105. data/bin/setup +7 -0
  106. data/config/environment.rb +8 -8
  107. data/config/initializers/ckeditor.rb +12 -5
  108. data/config/initializers/menus.rb +58 -66
  109. data/config/initializers/time_format.rb +1 -1
  110. data/config/routes.rb +16 -21
  111. data/db/migrate/20080401000000_create_activities_table.rb +7 -7
  112. data/db/migrate/20080401000001_create_sites_table.rb +2 -2
  113. data/db/migrate/20080401000002_create_sections_table.rb +3 -3
  114. data/db/migrate/20080401000003_create_contents_table.rb +12 -11
  115. data/db/migrate/20080401000004_create_categories_table.rb +3 -3
  116. data/db/migrate/20080401000005_create_category_assignments.rb +1 -1
  117. data/db/migrate/20080401000006_create_taggable_tables.rb +29 -26
  118. data/db/migrate/20080402000001_create_users_table.rb +11 -11
  119. data/db/migrate/20080402000005_create_memberships_table.rb +3 -3
  120. data/db/migrate/20080710000000_create_plugin_configs.rb +3 -3
  121. data/db/migrate/20080715131051_plugin_owner_column.rb +3 -3
  122. data/db/migrate/20081208161500_add_content_type_to_join_tables.rb +4 -4
  123. data/db/migrate/20090216114034_rename_category_assignment_to_categorization.rb +1 -1
  124. data/db/migrate/20090218083515_add_metatags_to_contents.rb +1 -1
  125. data/db/migrate/20090305123429_move_sections_to_pages.rb +3 -3
  126. data/db/migrate/20090519132700_add_published_at_to_sections.rb +3 -3
  127. data/db/migrate/20090522082000_add_metatags_to_sites.rb +2 -2
  128. data/db/migrate/20090625124502_create_accounts.rb +2 -2
  129. data/db/migrate/20090625133231_add_account_to_user.rb +1 -1
  130. data/db/migrate/20090702085459_create_section_translations.rb +3 -3
  131. data/db/migrate/20090702200226_create_category_translations.rb +3 -3
  132. data/db/migrate/20090707171100_upgrade_paperclip_paths.rb +3 -26
  133. data/db/migrate/20090709111934_add_email_notification_to_site.rb +5 -5
  134. data/db/migrate/20091026000906_add_nesting_to_articles.rb +4 -12
  135. data/db/migrate/20140721000000_add_title_to_contents.rb +1 -1
  136. data/db/migrate/20161227203152_add_timestamps_to_categories.rb +1 -1
  137. data/db/migrate/20241224000001_add_admin_to_users.rb +5 -0
  138. data/db/migrate/20241224000002_add_timestamps_to_sites.rb +5 -0
  139. data/db/migrate/20241224000003_add_timestamps_to_sections.rb +5 -0
  140. data/db/migrate/20241224000004_add_hidden_on_global_nav_to_sections.rb +5 -0
  141. data/db/migrate/20241224000005_widen_activities_author_columns.rb +6 -0
  142. data/db/migrate/20260408000001_upgrade_taggable_tables_for_acts_as_taggable_on.rb +55 -0
  143. data/db/migrate/20260720000001_widen_users_password_hash.rb +11 -0
  144. data/db/migrate/20260729000001_add_authlogic_tokens_to_users.rb +36 -0
  145. data/doc/NOTES +8 -8
  146. data/doc/testing.txt +66 -50
  147. data/gemfiles/rails_8_1.gemfile +8 -0
  148. data/lib/adva/authenticate_user.rb +52 -90
  149. data/lib/adva/belongs_to_author.rb +1 -1
  150. data/lib/adva/crypto_providers/bcrypt.rb +42 -0
  151. data/lib/adva/crypto_providers/legacy_salted_sha1.rb +31 -0
  152. data/lib/adva/extensible_forms.rb +17 -17
  153. data/lib/adva/has_options.rb +3 -4
  154. data/lib/adva/override.rb +55 -0
  155. data/lib/adva/version.rb +1 -1
  156. data/lib/adva.rb +10 -6
  157. data/lib/rails_ext/action_controller/default_params.rb +1 -1
  158. data/lib/rails_ext/action_controller/event_helper.rb +1 -1
  159. data/lib/rails_ext/action_controller/render_with_error_proc.rb +3 -3
  160. data/lib/rails_ext/action_controller/url_for_returning.rb +1 -1
  161. data/lib/rails_ext.rb +4 -5
  162. data/{test → spec}/fixtures/templates/menu/shared/_menu.html.erb +1 -1
  163. data/spec/helpers/activities_helper_more_spec.rb +41 -0
  164. data/spec/helpers/activities_helper_spec.rb +44 -0
  165. data/spec/helpers/admin/base_helper_spec.rb +14 -0
  166. data/spec/helpers/admin_base_helper_more_spec.rb +37 -0
  167. data/spec/helpers/base_helper_spec.rb +120 -0
  168. data/spec/helpers/content_helper_checkbox_spec.rb +21 -0
  169. data/spec/helpers/content_helper_more_spec.rb +104 -0
  170. data/spec/helpers/content_helper_spec.rb +14 -0
  171. data/spec/helpers/resource_helper_links_to_actions_spec.rb +13 -0
  172. data/spec/helpers/resource_helper_paths_spec.rb +21 -0
  173. data/spec/helpers/resource_helper_spec.rb +101 -0
  174. data/spec/helpers/users_helper_gravatar_spec.rb +18 -0
  175. data/spec/helpers/users_helper_spec.rb +55 -0
  176. data/spec/internal/.gitignore +3 -0
  177. data/spec/internal/app/assets/config/manifest.js +3 -0
  178. data/spec/internal/app/assets/images/.keep +0 -0
  179. data/spec/internal/app/assets/javascripts/.keep +0 -0
  180. data/spec/internal/app/assets/stylesheets/.keep +0 -0
  181. data/spec/internal/app/controllers/application_controller.rb +8 -0
  182. data/spec/internal/config/application.rb +26 -0
  183. data/spec/internal/config/database.yml +5 -0
  184. data/spec/internal/config/environment.rb +75 -0
  185. data/spec/internal/db/seed_for_tests.rb +12 -0
  186. data/{test → spec}/javascript/lib/jstest.rb +81 -81
  187. data/{test → spec}/javascript/templates/test_case.erb +1 -1
  188. data/spec/lib/adva_event_spec.rb +61 -0
  189. data/spec/lib/adva_override_spec.rb +197 -0
  190. data/spec/lib/authenticate_user_comprehensive_spec.rb +133 -0
  191. data/spec/lib/authenticate_user_cookies_spec.rb +40 -0
  192. data/spec/lib/base_controller_cache_spec.rb +20 -0
  193. data/spec/lib/base_controller_pagination_spec.rb +24 -0
  194. data/spec/lib/crypto_providers_spec.rb +104 -0
  195. data/spec/lib/extensible_forms_spec.rb +133 -0
  196. data/spec/lib/has_options_spec.rb +18 -0
  197. data/spec/lib/rails_ext_event_helper_spec.rb +24 -0
  198. data/spec/lib/rails_ext_render_with_error_proc_spec.rb +68 -0
  199. data/spec/lib/rails_ext_url_for_returning_spec.rb +20 -0
  200. data/spec/models/activity_spec.rb +171 -0
  201. data/spec/models/article_spec.rb +75 -0
  202. data/spec/models/belongs_to_author_spec.rb +24 -0
  203. data/spec/models/categorization_spec.rb +71 -0
  204. data/spec/models/category_spec.rb +273 -0
  205. data/spec/models/content_activity_logging_spec.rb +64 -0
  206. data/spec/models/content_additional_coverage_spec.rb +152 -0
  207. data/spec/models/content_permalink_spec.rb +24 -0
  208. data/spec/models/content_spec.rb +334 -0
  209. data/spec/models/link_spec.rb +53 -0
  210. data/spec/models/membership_spec.rb +53 -0
  211. data/spec/models/page_spec.rb +196 -0
  212. data/spec/models/password_mailer_spec.rb +162 -0
  213. data/spec/models/section_published_spec.rb +31 -0
  214. data/spec/models/section_spec.rb +77 -0
  215. data/spec/models/site_find_by_host_spec.rb +32 -0
  216. data/spec/models/site_spec.rb +53 -0
  217. data/spec/models/tag_spec.rb +16 -0
  218. data/spec/models/user_additional_coverage_spec.rb +264 -0
  219. data/spec/models/user_spec.rb +250 -0
  220. data/spec/rails_helper.rb +42 -0
  221. data/spec/requests/admin_articles_crud_spec.rb +63 -0
  222. data/spec/requests/admin_articles_spec.rb +12 -0
  223. data/spec/requests/admin_base_controller_additional_coverage_spec.rb +69 -0
  224. data/spec/requests/admin_base_controller_spec.rb +84 -0
  225. data/spec/requests/admin_categories_crud_spec.rb +32 -0
  226. data/spec/requests/admin_categories_spec.rb +13 -0
  227. data/spec/requests/admin_install_spec.rb +25 -0
  228. data/spec/requests/admin_page_articles_more_spec.rb +53 -0
  229. data/spec/requests/admin_page_categories_controller_spec.rb +21 -0
  230. data/spec/requests/admin_page_categories_update_all_spec.rb +94 -0
  231. data/spec/requests/admin_page_contents_controller_spec.rb +85 -0
  232. data/spec/requests/admin_page_contents_spec.rb +13 -0
  233. data/spec/requests/admin_page_contents_update_all_spec.rb +28 -0
  234. data/spec/requests/admin_page_links_spec.rb +84 -0
  235. data/spec/requests/admin_pages_spec.rb +13 -0
  236. data/spec/requests/admin_sections_authorized_spec.rb +13 -0
  237. data/spec/requests/admin_sections_controller_spec.rb +111 -0
  238. data/spec/requests/admin_sections_crud_paths_spec.rb +48 -0
  239. data/spec/requests/admin_sections_crud_spec.rb +20 -0
  240. data/spec/requests/admin_sections_spec.rb +12 -0
  241. data/spec/requests/admin_sections_update_all_spec.rb +29 -0
  242. data/spec/requests/admin_sites_authorized_spec.rb +13 -0
  243. data/spec/requests/admin_sites_controller_spec.rb +202 -0
  244. data/spec/requests/admin_sites_crud_spec.rb +37 -0
  245. data/spec/requests/admin_sites_failures_spec.rb +45 -0
  246. data/spec/requests/admin_sites_spec.rb +18 -0
  247. data/spec/requests/admin_users_crud_spec.rb +33 -0
  248. data/spec/requests/admin_users_failures_spec.rb +27 -0
  249. data/spec/requests/admin_users_spec.rb +35 -0
  250. data/spec/requests/articles_spec.rb +344 -0
  251. data/spec/requests/articles_tags_categories_spec.rb +40 -0
  252. data/spec/requests/base_controller_additional_coverage_spec.rb +295 -0
  253. data/spec/requests/base_controller_spec.rb +344 -0
  254. data/spec/requests/base_controller_unpublished_spec.rb +17 -0
  255. data/spec/requests/forgery_protection_spec.rb +85 -0
  256. data/spec/requests/page_articles_spec.rb +22 -0
  257. data/spec/requests/password_spec.rb +133 -0
  258. data/spec/requests/perishable_token_login_spec.rb +49 -0
  259. data/spec/requests/session_spec.rb +170 -0
  260. data/spec/requests/token_login_spec.rb +54 -0
  261. data/spec/spec_helper.rb +38 -0
  262. data/{test/plugins → spec/support}/adva_url_history/init_url_history.rb +2 -2
  263. data/spec/support/auth.rb +14 -0
  264. data/spec/support/failure_dump.rb +20 -0
  265. data/vendor/gems/belongs_to_cacheable/README.md +115 -4
  266. data/vendor/gems/belongs_to_cacheable/Rakefile +4 -0
  267. data/vendor/gems/belongs_to_cacheable/belongs_to_cacheable.gemspec +4 -2
  268. data/vendor/gems/belongs_to_cacheable/lib/active_record/belongs_to_cacheable.rb +2 -2
  269. data/vendor/gems/belongs_to_cacheable/spec/belongs_to_cacheable_spec.rb +29 -7
  270. data/vendor/gems/belongs_to_cacheable/spec/spec_helper.rb +15 -10
  271. data/vendor/gems/cacheable_flash/.rspec +3 -0
  272. data/vendor/gems/cacheable_flash/README.md +54 -4
  273. data/vendor/gems/cacheable_flash/Rakefile +4 -3
  274. data/vendor/gems/cacheable_flash/cacheable_flash.gemspec +7 -10
  275. data/vendor/gems/cacheable_flash/lib/cacheable_flash/middleware.rb +1 -1
  276. data/vendor/gems/cacheable_flash/spec/cacheable_flash/middleware_spec.rb +45 -0
  277. data/vendor/gems/cacheable_flash/spec/cacheable_flash/version_spec.rb +10 -0
  278. data/vendor/gems/cacheable_flash/spec/spec_helper.rb +26 -0
  279. data/vendor/gems/table_builder/README.md +212 -16
  280. data/vendor/gems/table_builder/Rakefile +4 -0
  281. data/vendor/gems/table_builder/lib/table_builder/body.rb +17 -4
  282. data/vendor/gems/table_builder/lib/table_builder/cell.rb +1 -1
  283. data/vendor/gems/table_builder/lib/table_builder/column.rb +3 -3
  284. data/vendor/gems/table_builder/lib/table_builder/head.rb +3 -3
  285. data/vendor/gems/table_builder/lib/table_builder/row.rb +5 -5
  286. data/vendor/gems/table_builder/lib/table_builder/rows.rb +5 -5
  287. data/vendor/gems/table_builder/lib/table_builder/table.rb +8 -8
  288. data/vendor/gems/table_builder/lib/table_builder/tag.rb +17 -9
  289. data/vendor/gems/table_builder/lib/table_builder.rb +14 -5
  290. data/vendor/gems/table_builder/spec/spec_helper.rb +111 -0
  291. data/vendor/gems/table_builder/{test → spec/support}/fixtures/templates/table_all.html.erb +6 -6
  292. data/vendor/gems/table_builder/{test → spec/support}/fixtures/templates/table_simple.html.erb +1 -1
  293. data/vendor/gems/table_builder/spec/table_builder_spec.rb +294 -0
  294. data/vendor/gems/table_builder/table_builder.gemspec +10 -2
  295. data/vendor/gems/tags/README.md +205 -15
  296. data/vendor/gems/tags/Rakefile +4 -0
  297. data/vendor/gems/tags/lib/breadcrumbs.rb +4 -4
  298. data/vendor/gems/tags/lib/menu/builder.rb +10 -10
  299. data/vendor/gems/tags/lib/menu.rb +10 -10
  300. data/vendor/gems/tags/spec/breadcrumbs_spec.rb +19 -0
  301. data/vendor/gems/tags/spec/menu_base_spec.rb +42 -0
  302. data/vendor/gems/tags/spec/menu_builder_spec.rb +77 -0
  303. data/vendor/gems/tags/spec/menu_spec.rb +173 -0
  304. data/vendor/gems/tags/spec/node_spec.rb +53 -0
  305. data/vendor/gems/tags/spec/sections_menu_spec.rb +125 -0
  306. data/vendor/gems/tags/spec/spec_helper.rb +53 -0
  307. data/vendor/gems/tags/spec/tag_spec.rb +31 -0
  308. data/vendor/gems/tags/tags.gemspec +10 -2
  309. metadata +550 -1171
  310. data/README +0 -245
  311. data/app/models/activity_notifier.rb +0 -11
  312. data/app/observers/activities/activity_observer.rb +0 -25
  313. data/app/observers/activities/article_observer.rb +0 -20
  314. data/app/observers/activities/comment_observer.rb +0 -33
  315. data/app/observers/activities/logger.rb +0 -94
  316. data/app/observers/activities/section_observer.rb +0 -9
  317. data/app/views/activity_notifier/new_content_notification.html.erb +0 -5
  318. data/app/views/admin/activities/_activities.html.erb +0 -10
  319. data/app/views/admin/activities/_comment.html.erb +0 -35
  320. data/app/views/admin/activities/_content.html.erb +0 -16
  321. data/app/views/admin/activities/_topic.html.erb +0 -16
  322. data/app/views/admin/install/confirmation.html.erb +0 -10
  323. data/app/views/admin/install/index.html.erb +0 -38
  324. data/app/views/admin/page/articles/_form.html.erb +0 -43
  325. data/app/views/admin/page/articles/_options.html.erb +0 -19
  326. data/app/views/admin/page/articles/edit.html.erb +0 -15
  327. data/app/views/admin/page/articles/new.html.erb +0 -12
  328. data/app/views/admin/page/categories/edit.html.erb +0 -22
  329. data/app/views/admin/page/categories/index.html.erb +0 -23
  330. data/app/views/admin/page/categories/new.html.erb +0 -21
  331. data/app/views/admin/page/contents/index.html.erb +0 -25
  332. data/app/views/admin/page/links/_form.html.erb +0 -26
  333. data/app/views/admin/page/links/_options.html.erb +0 -20
  334. data/app/views/admin/page/links/edit.html.erb +0 -12
  335. data/app/views/admin/page/links/new.html.erb +0 -12
  336. data/app/views/admin/sections/_form.html.haml +0 -19
  337. data/app/views/admin/sections/edit.html.haml +0 -6
  338. data/app/views/admin/sections/index.html.erb +0 -27
  339. data/app/views/admin/sections/new.html.erb +0 -31
  340. data/app/views/admin/sections/settings/_page.html.haml +0 -8
  341. data/app/views/admin/shared/_header.html.erb +0 -20
  342. data/app/views/admin/shared/_section.html.erb +0 -8
  343. data/app/views/admin/shared/_section_tree.html.erb +0 -23
  344. data/app/views/admin/sites/_email_notifications.html.erb +0 -8
  345. data/app/views/admin/sites/_form.html.erb +0 -15
  346. data/app/views/admin/sites/_recent_users.html.erb +0 -13
  347. data/app/views/admin/sites/_sections.html.erb +0 -10
  348. data/app/views/admin/sites/_unapproved_comments.html.erb +0 -10
  349. data/app/views/admin/sites/edit.html.erb +0 -4
  350. data/app/views/admin/sites/index.html.erb +0 -21
  351. data/app/views/admin/sites/multi_sites_disabled.html.erb +0 -11
  352. data/app/views/admin/sites/new.html.erb +0 -21
  353. data/app/views/admin/sites/show.html.erb +0 -13
  354. data/app/views/admin/users/_form.html.erb +0 -15
  355. data/app/views/admin/users/_sidebar.html.erb +0 -8
  356. data/app/views/admin/users/edit.html.erb +0 -7
  357. data/app/views/admin/users/index.html.erb +0 -13
  358. data/app/views/admin/users/new.html.erb +0 -5
  359. data/app/views/admin/users/show.html.erb +0 -27
  360. data/app/views/categories/_checkboxes.html.erb +0 -12
  361. data/app/views/layouts/admin.html.haml +0 -48
  362. data/app/views/layouts/login.html.erb +0 -26
  363. data/app/views/pages/articles/index.html.erb +0 -10
  364. data/app/views/pages/articles/show.html.erb +0 -17
  365. data/app/views/password/edit.html.erb +0 -24
  366. data/app/views/password/new.html.erb +0 -13
  367. data/app/views/password_mailer/reset_password_email.html.erb +0 -23
  368. data/app/views/password_mailer/updated_password_email.html.erb +0 -3
  369. data/app/views/session/new.html.erb +0 -17
  370. data/app/views/shared/_flash.html.erb +0 -3
  371. data/app/views/shared/_menu.html.erb +0 -10
  372. data/app/views/shared/_sidebar.html.erb +0 -19
  373. data/config/initializers/settings.rb +0 -26
  374. data/lib/tasks/adva.rake +0 -183
  375. data/test/NOTES +0 -56
  376. data/test/adva_user_contexts.rb +0 -42
  377. data/test/adva_user_fixtures.rb +0 -18
  378. data/test/contexts.rb +0 -365
  379. data/test/fixtures.rb +0 -190
  380. data/test/functional/admin/articles_controller_test.rb +0 -329
  381. data/test/functional/admin/base_controller_test.rb +0 -68
  382. data/test/functional/admin/cached_pages_controller_test.rb +0 -66
  383. data/test/functional/admin/categories_controller_test.rb +0 -164
  384. data/test/functional/admin/cells_controller_spec.rb +0 -32
  385. data/test/functional/admin/install_controller_test.rb +0 -85
  386. data/test/functional/admin/plugins_controller_test.rb +0 -93
  387. data/test/functional/admin/sections_controller_test.rb +0 -201
  388. data/test/functional/admin/sites_controller_test.rb +0 -240
  389. data/test/functional/admin/users_controller_test.rb +0 -176
  390. data/test/functional/asset_tag_expansions_test.rb +0 -82
  391. data/test/functional/base_controller_test.rb +0 -73
  392. data/test/functional/page_articles_controller_test.rb +0 -168
  393. data/test/functional/page_articles_routes_test.rb +0 -73
  394. data/test/functional/password_controller_test.rb +0 -96
  395. data/test/functional/session_controller_test.rb +0 -1
  396. data/test/functional/user_controller_test.rb +0 -95
  397. data/test/integration/admin/cached_pages_test.rb +0 -43
  398. data/test/integration/admin/categories_test.rb +0 -66
  399. data/test/integration/admin/custom_templates_test.rb +0 -42
  400. data/test/integration/admin/filtering_articles_test.rb +0 -32
  401. data/test/integration/admin/plugins.rb +0 -32
  402. data/test/integration/admin/section_article_test.rb +0 -150
  403. data/test/integration/admin/section_test.rb +0 -88
  404. data/test/integration/admin/sites_test.rb +0 -48
  405. data/test/integration/anonymous_login_test.rb +0 -39
  406. data/test/integration/edit_user_test.rb +0 -44
  407. data/test/integration/installation_test.rb +0 -109
  408. data/test/integration/memberships_test.rb +0 -52
  409. data/test/integration/page_article_comment_test.rb +0 -51
  410. data/test/integration/page_article_test.rb +0 -87
  411. data/test/integration/section_index_test.rb +0 -37
  412. data/test/integration/user_deletion_test.rb +0 -27
  413. data/test/integration/user_login_test.rb +0 -53
  414. data/test/integration/user_login_with_remember_me_test.rb +0 -20
  415. data/test/integration/user_registration_test.rb +0 -64
  416. data/test/matchy/History.txt +0 -4
  417. data/test/matchy/License.txt +0 -20
  418. data/test/matchy/Manifest.txt +0 -22
  419. data/test/matchy/PostInstall.txt +0 -7
  420. data/test/matchy/README.rdoc +0 -68
  421. data/test/matchy/Rakefile +0 -4
  422. data/test/matchy/config/hoe.rb +0 -73
  423. data/test/matchy/config/requirements.rb +0 -15
  424. data/test/matchy/lib/matchy/built_in/enumerable_expectations.rb +0 -69
  425. data/test/matchy/lib/matchy/built_in/error_expectations.rb +0 -90
  426. data/test/matchy/lib/matchy/built_in/operator_expectations.rb +0 -97
  427. data/test/matchy/lib/matchy/built_in/truth_expectations.rb +0 -231
  428. data/test/matchy/lib/matchy/expectation.rb +0 -47
  429. data/test/matchy/lib/matchy/modals.rb +0 -51
  430. data/test/matchy/lib/matchy/version.rb +0 -9
  431. data/test/matchy/lib/matchy.rb +0 -16
  432. data/test/matchy/matchy.gemspec +0 -47
  433. data/test/matchy/setup.rb +0 -1585
  434. data/test/matchy/tasks/deployment.rake +0 -34
  435. data/test/matchy/tasks/environment.rake +0 -7
  436. data/test/matchy/test/test_enumerable_expectations.rb +0 -91
  437. data/test/matchy/test/test_error_expectations.rb +0 -109
  438. data/test/matchy/test/test_expectation_base.rb +0 -35
  439. data/test/matchy/test/test_helper.rb +0 -2
  440. data/test/matchy/test/test_modals.rb +0 -39
  441. data/test/matchy/test/test_operator_expectations.rb +0 -157
  442. data/test/matchy/test/test_truth_expectations.rb +0 -258
  443. data/test/no_peeping_toms/README +0 -40
  444. data/test/no_peeping_toms/init.rb +0 -12
  445. data/test/no_peeping_toms/install.rb +0 -1
  446. data/test/no_peeping_toms/lib/no_peeping_toms.rb +0 -10
  447. data/test/no_peeping_toms/spec/db/database.yml +0 -3
  448. data/test/no_peeping_toms/spec/db/schema.rb +0 -5
  449. data/test/no_peeping_toms/spec/no_peeping_toms_spec.rb +0 -56
  450. data/test/no_peeping_toms/spec/spec_helper.rb +0 -8
  451. data/test/no_peeping_toms/tasks/no_peeping_toms_tasks.rake +0 -4
  452. data/test/no_peeping_toms/uninstall.rb +0 -1
  453. data/test/plugins/adva_context_templates/context_templates_test.rb +0 -138
  454. data/test/plugins/adva_post_ping/controller/integration_test.rb +0 -78
  455. data/test/plugins/adva_post_ping/post_ping_test.rb +0 -94
  456. data/test/plugins/adva_url_history/article_test.rb +0 -94
  457. data/test/plugins/adva_url_history/section_test.rb +0 -49
  458. data/test/rr/.gitignore +0 -6
  459. data/test/rr/CHANGES +0 -192
  460. data/test/rr/README.rdoc +0 -309
  461. data/test/rr/Rakefile +0 -70
  462. data/test/rr/doc/0.6.0.release.markdown +0 -81
  463. data/test/rr/introducting_rr.txt +0 -206
  464. data/test/rr/lib/rr/adapters/rr_methods.rb +0 -131
  465. data/test/rr/lib/rr/adapters/rspec.rb +0 -23
  466. data/test/rr/lib/rr/adapters/test_unit.rb +0 -25
  467. data/test/rr/lib/rr/double.rb +0 -212
  468. data/test/rr/lib/rr/double_definitions/child_double_definition_creator.rb +0 -27
  469. data/test/rr/lib/rr/double_definitions/double_definition.rb +0 -346
  470. data/test/rr/lib/rr/double_definitions/double_definition_creator.rb +0 -167
  471. data/test/rr/lib/rr/double_definitions/double_definition_creator_proxy.rb +0 -57
  472. data/test/rr/lib/rr/double_definitions/strategies/implementation/implementation_strategy.rb +0 -15
  473. data/test/rr/lib/rr/double_definitions/strategies/implementation/proxy.rb +0 -62
  474. data/test/rr/lib/rr/double_definitions/strategies/implementation/reimplementation.rb +0 -14
  475. data/test/rr/lib/rr/double_definitions/strategies/implementation/strongly_typed_reimplementation.rb +0 -17
  476. data/test/rr/lib/rr/double_definitions/strategies/scope/instance.rb +0 -15
  477. data/test/rr/lib/rr/double_definitions/strategies/scope/instance_of_class.rb +0 -46
  478. data/test/rr/lib/rr/double_definitions/strategies/scope/scope_strategy.rb +0 -15
  479. data/test/rr/lib/rr/double_definitions/strategies/strategy.rb +0 -70
  480. data/test/rr/lib/rr/double_definitions/strategies/verification/dont_allow.rb +0 -34
  481. data/test/rr/lib/rr/double_definitions/strategies/verification/mock.rb +0 -44
  482. data/test/rr/lib/rr/double_definitions/strategies/verification/stub.rb +0 -45
  483. data/test/rr/lib/rr/double_definitions/strategies/verification/verification_strategy.rb +0 -15
  484. data/test/rr/lib/rr/double_injection.rb +0 -141
  485. data/test/rr/lib/rr/double_matches.rb +0 -51
  486. data/test/rr/lib/rr/errors/argument_equality_error.rb +0 -6
  487. data/test/rr/lib/rr/errors/double_definition_error.rb +0 -6
  488. data/test/rr/lib/rr/errors/double_not_found_error.rb +0 -6
  489. data/test/rr/lib/rr/errors/double_order_error.rb +0 -6
  490. data/test/rr/lib/rr/errors/rr_error.rb +0 -20
  491. data/test/rr/lib/rr/errors/spy_verification_error.rb +0 -6
  492. data/test/rr/lib/rr/errors/subject_does_not_implement_method_error.rb +0 -6
  493. data/test/rr/lib/rr/errors/subject_has_different_arity_error.rb +0 -6
  494. data/test/rr/lib/rr/errors/times_called_error.rb +0 -6
  495. data/test/rr/lib/rr/expectations/any_argument_expectation.rb +0 -21
  496. data/test/rr/lib/rr/expectations/argument_equality_expectation.rb +0 -41
  497. data/test/rr/lib/rr/expectations/times_called_expectation.rb +0 -57
  498. data/test/rr/lib/rr/hash_with_object_id_key.rb +0 -41
  499. data/test/rr/lib/rr/invocation_matcher.rb +0 -27
  500. data/test/rr/lib/rr/recorded_calls.rb +0 -72
  501. data/test/rr/lib/rr/space.rb +0 -123
  502. data/test/rr/lib/rr/spy_verification.rb +0 -38
  503. data/test/rr/lib/rr/spy_verification_proxy.rb +0 -18
  504. data/test/rr/lib/rr/times_called_matchers/any_times_matcher.rb +0 -19
  505. data/test/rr/lib/rr/times_called_matchers/at_least_matcher.rb +0 -16
  506. data/test/rr/lib/rr/times_called_matchers/at_most_matcher.rb +0 -24
  507. data/test/rr/lib/rr/times_called_matchers/integer_matcher.rb +0 -19
  508. data/test/rr/lib/rr/times_called_matchers/non_terminal.rb +0 -27
  509. data/test/rr/lib/rr/times_called_matchers/proc_matcher.rb +0 -11
  510. data/test/rr/lib/rr/times_called_matchers/range_matcher.rb +0 -21
  511. data/test/rr/lib/rr/times_called_matchers/terminal.rb +0 -20
  512. data/test/rr/lib/rr/times_called_matchers/times_called_matcher.rb +0 -44
  513. data/test/rr/lib/rr/wildcard_matchers/anything.rb +0 -18
  514. data/test/rr/lib/rr/wildcard_matchers/boolean.rb +0 -23
  515. data/test/rr/lib/rr/wildcard_matchers/duck_type.rb +0 -32
  516. data/test/rr/lib/rr/wildcard_matchers/hash_including.rb +0 -29
  517. data/test/rr/lib/rr/wildcard_matchers/is_a.rb +0 -25
  518. data/test/rr/lib/rr/wildcard_matchers/numeric.rb +0 -13
  519. data/test/rr/lib/rr/wildcard_matchers/range.rb +0 -7
  520. data/test/rr/lib/rr/wildcard_matchers/regexp.rb +0 -7
  521. data/test/rr/lib/rr/wildcard_matchers/satisfy.rb +0 -26
  522. data/test/rr/lib/rr.rb +0 -83
  523. data/test/rr/spec/core_spec_suite.rb +0 -19
  524. data/test/rr/spec/environment_fixture_setup.rb +0 -6
  525. data/test/rr/spec/high_level_spec.rb +0 -350
  526. data/test/rr/spec/recorded_calls_spec.rb +0 -119
  527. data/test/rr/spec/rr/adapters/rr_methods_argument_matcher_spec.rb +0 -67
  528. data/test/rr/spec/rr/adapters/rr_methods_creator_spec.rb +0 -149
  529. data/test/rr/spec/rr/adapters/rr_methods_space_spec.rb +0 -115
  530. data/test/rr/spec/rr/adapters/rr_methods_spec_helper.rb +0 -11
  531. data/test/rr/spec/rr/adapters/rr_methods_times_matcher_spec.rb +0 -17
  532. data/test/rr/spec/rr/double_definitions/child_double_definition_creator_spec.rb +0 -112
  533. data/test/rr/spec/rr/double_definitions/double_definition_creator_proxy_spec.rb +0 -155
  534. data/test/rr/spec/rr/double_definitions/double_definition_creator_spec.rb +0 -502
  535. data/test/rr/spec/rr/double_definitions/double_definition_spec.rb +0 -1159
  536. data/test/rr/spec/rr/double_injection/double_injection_bind_spec.rb +0 -111
  537. data/test/rr/spec/rr/double_injection/double_injection_dispatching_spec.rb +0 -244
  538. data/test/rr/spec/rr/double_injection/double_injection_has_original_method_spec.rb +0 -55
  539. data/test/rr/spec/rr/double_injection/double_injection_reset_spec.rb +0 -90
  540. data/test/rr/spec/rr/double_injection/double_injection_spec.rb +0 -77
  541. data/test/rr/spec/rr/double_injection/double_injection_verify_spec.rb +0 -29
  542. data/test/rr/spec/rr/double_spec.rb +0 -352
  543. data/test/rr/spec/rr/errors/rr_error_spec.rb +0 -67
  544. data/test/rr/spec/rr/expectations/any_argument_expectation_spec.rb +0 -47
  545. data/test/rr/spec/rr/expectations/anything_argument_equality_expectation_spec.rb +0 -14
  546. data/test/rr/spec/rr/expectations/argument_equality_expectation_spec.rb +0 -135
  547. data/test/rr/spec/rr/expectations/boolean_argument_equality_expectation_spec.rb +0 -34
  548. data/test/rr/spec/rr/expectations/hash_including_argument_equality_expectation_spec.rb +0 -82
  549. data/test/rr/spec/rr/expectations/hash_including_spec.rb +0 -17
  550. data/test/rr/spec/rr/expectations/satisfy_argument_equality_expectation_spec.rb +0 -59
  551. data/test/rr/spec/rr/expectations/satisfy_spec.rb +0 -14
  552. data/test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_any_times_spec.rb +0 -46
  553. data/test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_at_least_spec.rb +0 -69
  554. data/test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_at_most_spec.rb +0 -71
  555. data/test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb +0 -23
  556. data/test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_integer_spec.rb +0 -104
  557. data/test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_proc_spec.rb +0 -81
  558. data/test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_range_spec.rb +0 -83
  559. data/test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_spec.rb +0 -38
  560. data/test/rr/spec/rr/invocation_matcher_spec.rb +0 -255
  561. data/test/rr/spec/rr/rspec/rspec_adapter_spec.rb +0 -66
  562. data/test/rr/spec/rr/rspec/rspec_backtrace_tweaking_spec.rb +0 -54
  563. data/test/rr/spec/rr/rspec/rspec_usage_spec.rb +0 -86
  564. data/test/rr/spec/rr/space/hash_with_object_id_key_spec.rb +0 -88
  565. data/test/rr/spec/rr/space/space_spec.rb +0 -542
  566. data/test/rr/spec/rr/test_unit/test_helper.rb +0 -7
  567. data/test/rr/spec/rr/test_unit/test_unit_backtrace_test.rb +0 -35
  568. data/test/rr/spec/rr/test_unit/test_unit_integration_test.rb +0 -47
  569. data/test/rr/spec/rr/times_called_matchers/any_times_matcher_spec.rb +0 -47
  570. data/test/rr/spec/rr/times_called_matchers/at_least_matcher_spec.rb +0 -55
  571. data/test/rr/spec/rr/times_called_matchers/at_most_matcher_spec.rb +0 -70
  572. data/test/rr/spec/rr/times_called_matchers/integer_matcher_spec.rb +0 -70
  573. data/test/rr/spec/rr/times_called_matchers/proc_matcher_spec.rb +0 -55
  574. data/test/rr/spec/rr/times_called_matchers/range_matcher_spec.rb +0 -76
  575. data/test/rr/spec/rr/times_called_matchers/times_called_matcher_spec.rb +0 -118
  576. data/test/rr/spec/rr/wildcard_matchers/anything_spec.rb +0 -24
  577. data/test/rr/spec/rr/wildcard_matchers/boolean_spec.rb +0 -36
  578. data/test/rr/spec/rr/wildcard_matchers/duck_type_spec.rb +0 -52
  579. data/test/rr/spec/rr/wildcard_matchers/is_a_spec.rb +0 -32
  580. data/test/rr/spec/rr/wildcard_matchers/numeric_spec.rb +0 -32
  581. data/test/rr/spec/rr/wildcard_matchers/range_spec.rb +0 -35
  582. data/test/rr/spec/rr/wildcard_matchers/regexp_spec.rb +0 -43
  583. data/test/rr/spec/rr_spec.rb +0 -28
  584. data/test/rr/spec/rspec_spec_suite.rb +0 -16
  585. data/test/rr/spec/spec.opts +0 -14
  586. data/test/rr/spec/spec_helper.rb +0 -107
  587. data/test/rr/spec/spec_suite.rb +0 -27
  588. data/test/rr/spec/test_unit_spec_suite.rb +0 -21
  589. data/test/test_helper/clear_directories.rb +0 -16
  590. data/test/test_helper/ensure_single_site_mode.rb +0 -10
  591. data/test/test_helper/extensions/cacheable_flash.rb +0 -14
  592. data/test/test_helper/extensions/cronjob.rb +0 -11
  593. data/test/test_helper/extensions/even_test_log.rb +0 -21
  594. data/test/test_helper/extensions/integration_test.rb +0 -78
  595. data/test/test_helper/extensions/matchy.rb +0 -365
  596. data/test/test_helper/extensions/matchy_adva_cms.rb +0 -441
  597. data/test/test_helper/extensions/rails_patch.rb +0 -40
  598. data/test/test_helper/extensions/rr.rb +0 -7
  599. data/test/test_helper/extensions/test_unit.rb +0 -35
  600. data/test/test_helper/extensions/with_sugar.rb +0 -166
  601. data/test/test_helper/parse_options.rb +0 -18
  602. data/test/test_helper/setup_db_transaction.rb +0 -15
  603. data/test/test_helper/setup_webrat.rb +0 -9
  604. data/test/test_helper/test_server/init.rb +0 -15
  605. data/test/test_helper.rb +0 -75
  606. data/test/test_plugin/about.yml +0 -7
  607. data/test/test_plugin/init.rb +0 -5
  608. data/test/test_server/README.textile +0 -19
  609. data/test/test_server/bin/server +0 -14
  610. data/test/test_server/bin/spec +0 -11
  611. data/test/test_server/bin/test +0 -11
  612. data/test/test_server/lib/test_server/client.rb +0 -24
  613. data/test/test_server/lib/test_server/rails.rb +0 -59
  614. data/test/test_server/lib/test_server/runner/redgreen.rb +0 -72
  615. data/test/test_server/lib/test_server/runner/specs.rb +0 -20
  616. data/test/test_server/lib/test_server/runner/test_unit.rb +0 -35
  617. data/test/test_server/lib/test_server/server.rb +0 -112
  618. data/test/test_server/lib/test_server.rb +0 -5
  619. data/test/test_server/test/resources/test/foo_test.rb +0 -1
  620. data/test/test_server/test/server_test.rb +0 -27
  621. data/test/test_server/test/test_helper.rb +0 -7
  622. data/test/unit/activities_notifier_test.rb +0 -75
  623. data/test/unit/activity_observer_test.rb +0 -65
  624. data/test/unit/activity_test.rb +0 -84
  625. data/test/unit/cells/user_cell_test.rb +0 -13
  626. data/test/unit/helpers/admin/base_helper_test.rb +0 -139
  627. data/test/unit/helpers/base_helper_spec.rb +0 -54
  628. data/test/unit/helpers/base_helper_test.rb +0 -165
  629. data/test/unit/helpers/content_helper_test.rb +0 -127
  630. data/test/unit/helpers/resource_helper_test.rb +0 -180
  631. data/test/unit/helpers/users_helper_test.rb +0 -52
  632. data/test/unit/i18n_test.rb +0 -22
  633. data/test/unit/lib/cells_ext_spec.rb +0 -96
  634. data/test/unit/lib/extensible_forms_test.rb +0 -362
  635. data/test/unit/lib/menu_test.rb +0 -119
  636. data/test/unit/lib/rails_ext/content_for_assignments_test.rb +0 -75
  637. data/test/unit/lib/rails_ext/plugin_configuration_test.rb +0 -40
  638. data/test/unit/lib/rails_ext/sticky_changes_test.rb +0 -33
  639. data/test/unit/lib/registry_test.rb +0 -91
  640. data/test/unit/lib/routing_filter/routing_filter_categories_spec.rb +0 -63
  641. data/test/unit/lib/routing_filter/routing_filter_categories_test.rb +0 -159
  642. data/test/unit/lib/routing_filter/routing_filter_locale_spec.rb +0 -73
  643. data/test/unit/lib/routing_filter/routing_filter_root_blog_archive_spec.rb +0 -40
  644. data/test/unit/lib/routing_filter/routing_filter_root_section_articles_spec.rb +0 -48
  645. data/test/unit/lib/routing_filter/routing_filter_root_wikipages_spec.rb +0 -40
  646. data/test/unit/lib/routing_filter/routing_filter_sections_spec.rb +0 -143
  647. data/test/unit/lib/routing_filter/routing_filter_sections_test.rb +0 -32
  648. data/test/unit/lib/routing_filter/routing_filter_sets_test.rb +0 -86
  649. data/test/unit/models/account_test.rb +0 -21
  650. data/test/unit/models/anonymous_test.rb +0 -54
  651. data/test/unit/models/article_test.rb +0 -191
  652. data/test/unit/models/category_test.rb +0 -68
  653. data/test/unit/models/content_test.rb +0 -409
  654. data/test/unit/models/counter_test.rb +0 -43
  655. data/test/unit/models/event_test.rb +0 -41
  656. data/test/unit/models/nested_categories_test.rb +0 -34
  657. data/test/unit/models/page_test.rb +0 -63
  658. data/test/unit/models/password_mailer_test.rb +0 -26
  659. data/test/unit/models/section_test.rb +0 -315
  660. data/test/unit/models/site_test.rb +0 -199
  661. data/test/unit/models/user_mailer_test.rb +0 -16
  662. data/test/unit/models/user_test.rb +0 -173
  663. data/test/unit/observers/activities_article_observer_test.rb +0 -42
  664. data/test/webrat/.document +0 -4
  665. data/test/webrat/History.txt +0 -264
  666. data/test/webrat/MIT-LICENSE.txt +0 -19
  667. data/test/webrat/README.rdoc +0 -85
  668. data/test/webrat/Rakefile +0 -151
  669. data/test/webrat/install.rb +0 -1
  670. data/test/webrat/lib/webrat/core/configuration.rb +0 -89
  671. data/test/webrat/lib/webrat/core/elements/area.rb +0 -31
  672. data/test/webrat/lib/webrat/core/elements/element.rb +0 -33
  673. data/test/webrat/lib/webrat/core/elements/field.rb +0 -396
  674. data/test/webrat/lib/webrat/core/elements/form.rb +0 -103
  675. data/test/webrat/lib/webrat/core/elements/label.rb +0 -31
  676. data/test/webrat/lib/webrat/core/elements/link.rb +0 -90
  677. data/test/webrat/lib/webrat/core/elements/select_option.rb +0 -35
  678. data/test/webrat/lib/webrat/core/locators/area_locator.rb +0 -38
  679. data/test/webrat/lib/webrat/core/locators/button_locator.rb +0 -54
  680. data/test/webrat/lib/webrat/core/locators/field_by_id_locator.rb +0 -37
  681. data/test/webrat/lib/webrat/core/locators/field_labeled_locator.rb +0 -56
  682. data/test/webrat/lib/webrat/core/locators/field_locator.rb +0 -25
  683. data/test/webrat/lib/webrat/core/locators/field_named_locator.rb +0 -41
  684. data/test/webrat/lib/webrat/core/locators/form_locator.rb +0 -19
  685. data/test/webrat/lib/webrat/core/locators/label_locator.rb +0 -34
  686. data/test/webrat/lib/webrat/core/locators/link_locator.rb +0 -66
  687. data/test/webrat/lib/webrat/core/locators/locator.rb +0 -20
  688. data/test/webrat/lib/webrat/core/locators/select_option_locator.rb +0 -59
  689. data/test/webrat/lib/webrat/core/locators.rb +0 -20
  690. data/test/webrat/lib/webrat/core/logging.rb +0 -21
  691. data/test/webrat/lib/webrat/core/matchers/have_content.rb +0 -69
  692. data/test/webrat/lib/webrat/core/matchers/have_selector.rb +0 -52
  693. data/test/webrat/lib/webrat/core/matchers/have_tag.rb +0 -71
  694. data/test/webrat/lib/webrat/core/matchers/have_xpath.rb +0 -93
  695. data/test/webrat/lib/webrat/core/matchers.rb +0 -4
  696. data/test/webrat/lib/webrat/core/methods.rb +0 -61
  697. data/test/webrat/lib/webrat/core/mime.rb +0 -29
  698. data/test/webrat/lib/webrat/core/save_and_open_page.rb +0 -50
  699. data/test/webrat/lib/webrat/core/scope.rb +0 -350
  700. data/test/webrat/lib/webrat/core/session.rb +0 -259
  701. data/test/webrat/lib/webrat/core/xml/hpricot.rb +0 -19
  702. data/test/webrat/lib/webrat/core/xml/nokogiri.rb +0 -76
  703. data/test/webrat/lib/webrat/core/xml/rexml.rb +0 -24
  704. data/test/webrat/lib/webrat/core/xml.rb +0 -115
  705. data/test/webrat/lib/webrat/core.rb +0 -14
  706. data/test/webrat/lib/webrat/core_extensions/blank.rb +0 -58
  707. data/test/webrat/lib/webrat/core_extensions/deprecate.rb +0 -8
  708. data/test/webrat/lib/webrat/core_extensions/detect_mapped.rb +0 -12
  709. data/test/webrat/lib/webrat/core_extensions/hash_with_indifferent_access.rb +0 -131
  710. data/test/webrat/lib/webrat/core_extensions/meta_class.rb +0 -6
  711. data/test/webrat/lib/webrat/core_extensions/nil_to_param.rb +0 -5
  712. data/test/webrat/lib/webrat/mechanize.rb +0 -74
  713. data/test/webrat/lib/webrat/merb.rb +0 -9
  714. data/test/webrat/lib/webrat/merb_session.rb +0 -65
  715. data/test/webrat/lib/webrat/rack.rb +0 -24
  716. data/test/webrat/lib/webrat/rails.rb +0 -105
  717. data/test/webrat/lib/webrat/rspec-rails.rb +0 -13
  718. data/test/webrat/lib/webrat/selenium/location_strategy_javascript/button.js +0 -12
  719. data/test/webrat/lib/webrat/selenium/location_strategy_javascript/label.js +0 -16
  720. data/test/webrat/lib/webrat/selenium/location_strategy_javascript/webrat.js +0 -5
  721. data/test/webrat/lib/webrat/selenium/location_strategy_javascript/webratlink.js +0 -9
  722. data/test/webrat/lib/webrat/selenium/location_strategy_javascript/webratlinkwithin.js +0 -15
  723. data/test/webrat/lib/webrat/selenium/location_strategy_javascript/webratselectwithoption.js +0 -5
  724. data/test/webrat/lib/webrat/selenium/matchers/have_content.rb +0 -66
  725. data/test/webrat/lib/webrat/selenium/matchers/have_selector.rb +0 -49
  726. data/test/webrat/lib/webrat/selenium/matchers/have_tag.rb +0 -72
  727. data/test/webrat/lib/webrat/selenium/matchers/have_xpath.rb +0 -45
  728. data/test/webrat/lib/webrat/selenium/matchers.rb +0 -4
  729. data/test/webrat/lib/webrat/selenium/selenium_extensions.js +0 -6
  730. data/test/webrat/lib/webrat/selenium/selenium_session.rb +0 -237
  731. data/test/webrat/lib/webrat/selenium.rb +0 -99
  732. data/test/webrat/lib/webrat/sinatra.rb +0 -30
  733. data/test/webrat/lib/webrat.rb +0 -34
  734. data/test/webrat/spec/fakes/test_session.rb +0 -34
  735. data/test/webrat/spec/integration/merb/.gitignore +0 -21
  736. data/test/webrat/spec/integration/merb/Rakefile +0 -35
  737. data/test/webrat/spec/integration/merb/app/controllers/application.rb +0 -2
  738. data/test/webrat/spec/integration/merb/app/controllers/exceptions.rb +0 -13
  739. data/test/webrat/spec/integration/merb/app/controllers/testing.rb +0 -18
  740. data/test/webrat/spec/integration/merb/app/views/exceptions/not_acceptable.html.erb +0 -63
  741. data/test/webrat/spec/integration/merb/app/views/exceptions/not_found.html.erb +0 -47
  742. data/test/webrat/spec/integration/merb/app/views/layout/application.html.erb +0 -12
  743. data/test/webrat/spec/integration/merb/app/views/testing/show_form.html.erb +0 -27
  744. data/test/webrat/spec/integration/merb/config/environments/development.rb +0 -15
  745. data/test/webrat/spec/integration/merb/config/environments/rake.rb +0 -11
  746. data/test/webrat/spec/integration/merb/config/environments/test.rb +0 -14
  747. data/test/webrat/spec/integration/merb/config/init.rb +0 -25
  748. data/test/webrat/spec/integration/merb/config/rack.rb +0 -11
  749. data/test/webrat/spec/integration/merb/config/router.rb +0 -33
  750. data/test/webrat/spec/integration/merb/spec/spec.opts +0 -1
  751. data/test/webrat/spec/integration/merb/spec/spec_helper.rb +0 -24
  752. data/test/webrat/spec/integration/merb/spec/webrat_spec.rb +0 -32
  753. data/test/webrat/spec/integration/merb/tasks/merb.thor/app_script.rb +0 -31
  754. data/test/webrat/spec/integration/merb/tasks/merb.thor/common.rb +0 -64
  755. data/test/webrat/spec/integration/merb/tasks/merb.thor/gem_ext.rb +0 -124
  756. data/test/webrat/spec/integration/merb/tasks/merb.thor/main.thor +0 -150
  757. data/test/webrat/spec/integration/merb/tasks/merb.thor/ops.rb +0 -93
  758. data/test/webrat/spec/integration/merb/tasks/merb.thor/utils.rb +0 -40
  759. data/test/webrat/spec/integration/rails/.gitignore +0 -3
  760. data/test/webrat/spec/integration/rails/Rakefile +0 -30
  761. data/test/webrat/spec/integration/rails/app/controllers/application.rb +0 -15
  762. data/test/webrat/spec/integration/rails/app/controllers/webrat_controller.rb +0 -35
  763. data/test/webrat/spec/integration/rails/app/views/webrat/before_redirect_form.html.erb +0 -4
  764. data/test/webrat/spec/integration/rails/app/views/webrat/form.html.erb +0 -28
  765. data/test/webrat/spec/integration/rails/config/boot.rb +0 -109
  766. data/test/webrat/spec/integration/rails/config/environment.rb +0 -12
  767. data/test/webrat/spec/integration/rails/config/environments/development.rb +0 -17
  768. data/test/webrat/spec/integration/rails/config/environments/selenium.rb +0 -22
  769. data/test/webrat/spec/integration/rails/config/environments/test.rb +0 -22
  770. data/test/webrat/spec/integration/rails/config/initializers/inflections.rb +0 -10
  771. data/test/webrat/spec/integration/rails/config/initializers/mime_types.rb +0 -5
  772. data/test/webrat/spec/integration/rails/config/initializers/new_rails_defaults.rb +0 -17
  773. data/test/webrat/spec/integration/rails/config/locales/en.yml +0 -5
  774. data/test/webrat/spec/integration/rails/config/routes.rb +0 -13
  775. data/test/webrat/spec/integration/rails/public/404.html +0 -30
  776. data/test/webrat/spec/integration/rails/public/422.html +0 -30
  777. data/test/webrat/spec/integration/rails/public/500.html +0 -33
  778. data/test/webrat/spec/integration/rails/script/about +0 -4
  779. data/test/webrat/spec/integration/rails/script/console +0 -3
  780. data/test/webrat/spec/integration/rails/script/dbconsole +0 -3
  781. data/test/webrat/spec/integration/rails/script/destroy +0 -3
  782. data/test/webrat/spec/integration/rails/script/generate +0 -3
  783. data/test/webrat/spec/integration/rails/script/performance/benchmarker +0 -3
  784. data/test/webrat/spec/integration/rails/script/performance/profiler +0 -3
  785. data/test/webrat/spec/integration/rails/script/performance/request +0 -3
  786. data/test/webrat/spec/integration/rails/script/plugin +0 -3
  787. data/test/webrat/spec/integration/rails/script/process/inspector +0 -3
  788. data/test/webrat/spec/integration/rails/script/process/reaper +0 -3
  789. data/test/webrat/spec/integration/rails/script/process/spawner +0 -3
  790. data/test/webrat/spec/integration/rails/script/runner +0 -3
  791. data/test/webrat/spec/integration/rails/script/server +0 -3
  792. data/test/webrat/spec/integration/rails/test/integration/webrat_test.rb +0 -74
  793. data/test/webrat/spec/integration/rails/test/test_helper.rb +0 -25
  794. data/test/webrat/spec/integration/sinatra/Rakefile +0 -5
  795. data/test/webrat/spec/integration/sinatra/app.rb +0 -64
  796. data/test/webrat/spec/integration/sinatra/test/test_helper.rb +0 -17
  797. data/test/webrat/spec/integration/sinatra/test/webrat_test.rb +0 -36
  798. data/test/webrat/spec/private/core/configuration_spec.rb +0 -99
  799. data/test/webrat/spec/private/core/field_spec.rb +0 -67
  800. data/test/webrat/spec/private/core/link_spec.rb +0 -24
  801. data/test/webrat/spec/private/core/logging_spec.rb +0 -10
  802. data/test/webrat/spec/private/core/session_spec.rb +0 -207
  803. data/test/webrat/spec/private/mechanize/mechanize_session_spec.rb +0 -81
  804. data/test/webrat/spec/private/merb/indifferent_access_spec.rb +0 -47
  805. data/test/webrat/spec/private/merb/merb_session_spec.rb +0 -42
  806. data/test/webrat/spec/private/nokogiri_spec.rb +0 -77
  807. data/test/webrat/spec/private/rails/attaches_file_spec.rb +0 -81
  808. data/test/webrat/spec/private/rails/rails_session_spec.rb +0 -110
  809. data/test/webrat/spec/private/selenium/selenium_session_spec.rb +0 -44
  810. data/test/webrat/spec/private/selenium/selenium_spec.rb +0 -59
  811. data/test/webrat/spec/private/sinatra/helper.rb +0 -2
  812. data/test/webrat/spec/private/sinatra/sinatra_session_spec.rb +0 -28
  813. data/test/webrat/spec/public/basic_auth_spec.rb +0 -24
  814. data/test/webrat/spec/public/check_spec.rb +0 -154
  815. data/test/webrat/spec/public/choose_spec.rb +0 -118
  816. data/test/webrat/spec/public/click_area_spec.rb +0 -106
  817. data/test/webrat/spec/public/click_button_spec.rb +0 -502
  818. data/test/webrat/spec/public/click_link_spec.rb +0 -469
  819. data/test/webrat/spec/public/fill_in_spec.rb +0 -209
  820. data/test/webrat/spec/public/locators/field_by_xpath_spec.rb +0 -19
  821. data/test/webrat/spec/public/locators/field_labeled_spec.rb +0 -157
  822. data/test/webrat/spec/public/locators/field_with_id_spec.rb +0 -16
  823. data/test/webrat/spec/public/matchers_spec.rb +0 -321
  824. data/test/webrat/spec/public/reload_spec.rb +0 -10
  825. data/test/webrat/spec/public/save_and_open_spec.rb +0 -51
  826. data/test/webrat/spec/public/select_date_spec.rb +0 -88
  827. data/test/webrat/spec/public/select_datetime_spec.rb +0 -106
  828. data/test/webrat/spec/public/select_spec.rb +0 -246
  829. data/test/webrat/spec/public/select_time_spec.rb +0 -79
  830. data/test/webrat/spec/public/set_hidden_field_spec.rb +0 -5
  831. data/test/webrat/spec/public/submit_form_spec.rb +0 -5
  832. data/test/webrat/spec/public/visit_spec.rb +0 -67
  833. data/test/webrat/spec/public/within_spec.rb +0 -177
  834. data/test/webrat/spec/rcov.opts +0 -1
  835. data/test/webrat/spec/spec.opts +0 -2
  836. data/test/webrat/spec/spec_helper.rb +0 -50
  837. data/test/webrat/vendor/selenium-server.jar +0 -0
  838. data/test/with/README.textile +0 -136
  839. data/test/with/demo.rb +0 -158
  840. data/test/with/lib/with/call.rb +0 -40
  841. data/test/with/lib/with/context.rb +0 -95
  842. data/test/with/lib/with/implementation.rb +0 -18
  843. data/test/with/lib/with/node.rb +0 -65
  844. data/test/with/lib/with/sharing.rb +0 -29
  845. data/test/with/lib/with.rb +0 -81
  846. data/test/with/test/all.rb +0 -1
  847. data/test/with/test/context_calls_test.rb +0 -56
  848. data/test/with/test/context_compile_test.rb +0 -106
  849. data/test/with/test/context_structure_test.rb +0 -142
  850. data/test/with/test/demo_test.rb +0 -63
  851. data/test/with/test/helper.rb +0 -68
  852. data/test/with-sugar/lib/with-sugar/caching.rb +0 -41
  853. data/test/with-sugar/lib/with-sugar/controller.rb +0 -110
  854. data/test/with-sugar/lib/with-sugar/core.rb +0 -7
  855. data/test/with-sugar/lib/with-sugar/model.rb +0 -151
  856. data/test/with-sugar/lib/with-sugar/routing.rb +0 -30
  857. data/test/with-sugar/lib/with-sugar/view.rb +0 -65
  858. data/test/with-sugar/lib/with-sugar.rb +0 -6
  859. data/test/with-sugar/test/helper.rb +0 -19
  860. data/test/with-sugar/test/view_test.rb +0 -12
  861. data/vendor/gems/authentication/.gitignore +0 -17
  862. data/vendor/gems/authentication/Gemfile +0 -4
  863. data/vendor/gems/authentication/LICENSE +0 -22
  864. data/vendor/gems/authentication/MIT-LICENSE +0 -38
  865. data/vendor/gems/authentication/README +0 -39
  866. data/vendor/gems/authentication/README.md +0 -29
  867. data/vendor/gems/authentication/RUNNING_UNIT_TESTS +0 -13
  868. data/vendor/gems/authentication/Rakefile +0 -61
  869. data/vendor/gems/authentication/authentication.gemspec +0 -17
  870. data/vendor/gems/authentication/lib/authentication/active_record_extensions.rb +0 -11
  871. data/vendor/gems/authentication/lib/authentication/bogus.rb +0 -13
  872. data/vendor/gems/authentication/lib/authentication/hash_helper.rb +0 -26
  873. data/vendor/gems/authentication/lib/authentication/ldap.rb +0 -49
  874. data/vendor/gems/authentication/lib/authentication/remember_me.rb +0 -52
  875. data/vendor/gems/authentication/lib/authentication/salted_hash.rb +0 -53
  876. data/vendor/gems/authentication/lib/authentication/single_token.rb +0 -54
  877. data/vendor/gems/authentication/lib/authentication/version.rb +0 -3
  878. data/vendor/gems/authentication/lib/authentication.rb +0 -270
  879. data/vendor/gems/authentication/lib/radius/dictionary +0 -207
  880. data/vendor/gems/authentication/test_backup/abstract_unit.rb +0 -30
  881. data/vendor/gems/authentication/test_backup/active_record_extension_test.rb +0 -17
  882. data/vendor/gems/authentication/test_backup/authentication_test.rb +0 -231
  883. data/vendor/gems/authentication/test_backup/database.yml +0 -12
  884. data/vendor/gems/authentication/test_backup/fixtures/user.rb +0 -3
  885. data/vendor/gems/authentication/test_backup/fixtures/users.yml +0 -3
  886. data/vendor/gems/authentication/test_backup/options_test.rb +0 -100
  887. data/vendor/gems/authentication/test_backup/remember_me_test.rb +0 -41
  888. data/vendor/gems/authentication/test_backup/salted_hash_test.rb +0 -38
  889. data/vendor/gems/authentication/test_backup/schema.rb +0 -10
  890. data/vendor/gems/authentication/test_backup/single_token_test.rb +0 -44
  891. data/vendor/gems/authentication/test_backup/test_helper.rb +0 -8
  892. data/vendor/gems/filtered_column/.gitignore +0 -17
  893. data/vendor/gems/filtered_column/Gemfile +0 -4
  894. data/vendor/gems/filtered_column/LICENSE +0 -22
  895. data/vendor/gems/filtered_column/README +0 -4
  896. data/vendor/gems/filtered_column/README.md +0 -29
  897. data/vendor/gems/filtered_column/Rakefile +0 -23
  898. data/vendor/gems/filtered_column/filtered_column.gemspec +0 -17
  899. data/vendor/gems/filtered_column/lib/filtered_column/filters/base.rb +0 -28
  900. data/vendor/gems/filtered_column/lib/filtered_column/filters/smartypants_filter.rb +0 -14
  901. data/vendor/gems/filtered_column/lib/filtered_column/filters/textile_filter.rb +0 -13
  902. data/vendor/gems/filtered_column/lib/filtered_column/macros/base.rb +0 -25
  903. data/vendor/gems/filtered_column/lib/filtered_column/mixin.rb +0 -46
  904. data/vendor/gems/filtered_column/lib/filtered_column/processor.rb +0 -52
  905. data/vendor/gems/filtered_column/lib/filtered_column/version.rb +0 -3
  906. data/vendor/gems/filtered_column/lib/filtered_column.rb +0 -17
  907. data/vendor/gems/filtered_column/tasks/filtered_column_tasks.rake +0 -4
  908. data/vendor/gems/filtered_column/test/abstract_unit.rb +0 -74
  909. data/vendor/gems/filtered_column/test/filtered_column_test.rb +0 -53
  910. data/vendor/gems/filtered_column/test/macro_filter_test.rb +0 -23
  911. data/vendor/gems/simple_taggable/.gitignore +0 -17
  912. data/vendor/gems/simple_taggable/Gemfile +0 -7
  913. data/vendor/gems/simple_taggable/LICENSE +0 -22
  914. data/vendor/gems/simple_taggable/README +0 -24
  915. data/vendor/gems/simple_taggable/README.md +0 -29
  916. data/vendor/gems/simple_taggable/Rakefile +0 -2
  917. data/vendor/gems/simple_taggable/lib/simple_taggable/version.rb +0 -3
  918. data/vendor/gems/simple_taggable/lib/simple_taggable.rb +0 -163
  919. data/vendor/gems/simple_taggable/lib/tag.rb +0 -31
  920. data/vendor/gems/simple_taggable/lib/tag_list.rb +0 -104
  921. data/vendor/gems/simple_taggable/lib/tagging.rb +0 -8
  922. data/vendor/gems/simple_taggable/simple_taggable.gemspec +0 -19
  923. data/vendor/gems/simple_taggable/test/db/schema.rb +0 -41
  924. data/vendor/gems/simple_taggable/test/db/simple_taggable.sqlite3.db +0 -0
  925. data/vendor/gems/simple_taggable/test/fixtures/magazine.rb +0 -3
  926. data/vendor/gems/simple_taggable/test/fixtures/magazines.yml +0 -2
  927. data/vendor/gems/simple_taggable/test/fixtures/photo.rb +0 -8
  928. data/vendor/gems/simple_taggable/test/fixtures/photos.yml +0 -19
  929. data/vendor/gems/simple_taggable/test/fixtures/post.rb +0 -5
  930. data/vendor/gems/simple_taggable/test/fixtures/posts.yml +0 -27
  931. data/vendor/gems/simple_taggable/test/fixtures/subscription.rb +0 -4
  932. data/vendor/gems/simple_taggable/test/fixtures/subscriptions.yml +0 -3
  933. data/vendor/gems/simple_taggable/test/fixtures/taggings.yml +0 -112
  934. data/vendor/gems/simple_taggable/test/fixtures/tags.yml +0 -14
  935. data/vendor/gems/simple_taggable/test/fixtures/user.rb +0 -6
  936. data/vendor/gems/simple_taggable/test/fixtures/users.yml +0 -5
  937. data/vendor/gems/simple_taggable/test/log/simple_taggable.log +0 -1614
  938. data/vendor/gems/simple_taggable/test/simple_taggable_test.rb +0 -253
  939. data/vendor/gems/simple_taggable/test/tag_list_test.rb +0 -123
  940. data/vendor/gems/simple_taggable/test/test_helper.rb +0 -80
  941. data/vendor/gems/table_builder/test/table_builder/table_test.rb +0 -230
  942. data/vendor/gems/table_builder/test/test_helper.rb +0 -49
  943. data/vendor/gems/tags/test/tags/menu_test.rb +0 -173
  944. data/vendor/gems/tags/test/tags/tag_test.rb +0 -13
  945. data/vendor/gems/tags/test/test_helper.rb +0 -18
  946. /data/{test → spec}/fixtures/templates/alternative_templates/index.html.erb +0 -0
  947. /data/{test → spec}/fixtures/templates/context_templates_test/index.html.erb +0 -0
  948. /data/{test → spec}/fixtures/templates/context_templates_test/show.html.erb +0 -0
  949. /data/{test → spec}/fixtures/templates/layouts/alternative.html.erb +0 -0
  950. /data/{test → spec}/fixtures/templates/layouts/default.html.erb +0 -0
  951. /data/{test → spec}/javascript/assets/jquery-lowpro.js +0 -0
  952. /data/{test → spec}/javascript/assets/jquery-ui.js +0 -0
  953. /data/{test → spec}/javascript/assets/jquery.js +0 -0
  954. /data/{test → spec}/javascript/assets/testrunner.js +0 -0
  955. /data/{test → spec}/javascript/assets/testsuite.scss +0 -0
  956. /data/vendor/gems/table_builder/{test → spec/support}/fixtures/templates/table_auto_body.html.erb +0 -0
  957. /data/vendor/gems/table_builder/{test → spec/support}/fixtures/templates/table_auto_columns.html.erb +0 -0
@@ -1,91 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../test_helper')
2
-
3
- $:.unshift File.expand_path(File.dirname(__FILE__) + '/../../../lib')
4
- require 'registry'
5
-
6
- class Registry
7
- @@old_instance = nil
8
-
9
- class << self
10
- def backup!
11
- @@old_instance = defined?(@@instance) ? @@instance.dup : Registry.new
12
- end
13
-
14
- def restore!
15
- @@instance = @@old_instance
16
- end
17
- end
18
- end
19
-
20
- class RegistryTest < ActiveSupport::TestCase
21
- def setup
22
- super
23
- Registry.backup!
24
- @registry = Registry.instance
25
- end
26
-
27
- def teardown
28
- super
29
- Registry.restore!
30
- end
31
-
32
- # set
33
-
34
- test "#set sets stuff" do
35
- @registry.clear
36
- @registry.set :foo, :bar
37
- @registry.should == {:foo => :bar}
38
- end
39
-
40
- test "#set sets stuff to nested keys" do
41
- @registry.clear
42
- @registry.set :foo, :bar, :baz, :buz
43
- @registry.should == {:foo => {:bar => {:baz => :buz}}}
44
- end
45
-
46
- test "#set recursively turns passed hashes into registries" do
47
- @registry.clear
48
- @registry.set :foo, {:bar => {:baz => :buz}}
49
- @registry.get(:foo).get(:bar).should be_instance_of(Registry)
50
- end
51
-
52
- # get
53
-
54
- test "#get gets stuff from nested keys" do
55
- @registry.set :foo, :bar, :baz, :buz
56
- @registry.get(:foo, :bar).should == {:baz => :buz}
57
- end
58
-
59
- test "#get returns nil if an intermediary key is missing" do
60
- @registry.set :foo, :bar, :baz, :buz
61
- @registry.get(:foo, :missing).should be_nil
62
- end
63
-
64
- # alias
65
-
66
- test "#[] and #[]= should work" do
67
- @registry[:test] = "test-alias"
68
- @registry[:test].should == "test-alias"
69
- end
70
-
71
- test "#[]= should supports nested keys" do
72
- @registry[:test1][:test2] = "key"
73
- @registry[:test1].should == {:test2 => "key"}
74
- @registry[:test1][:test2].should == "key"
75
- end
76
-
77
- # clear
78
-
79
- test "#clear clears registry" do
80
- @registry.set :foo, :bar, :baz, :buz
81
- @registry.get(:foo, :bar).should == {:baz => :buz}
82
- Registry.clear
83
- @registry.get(:foo, :bar).should be_nil
84
- @registry.should be_empty
85
- end
86
-
87
- test "#clear returns nil if an intermediary key is missing" do
88
- @registry.set :foo, :bar, :baz, :buz
89
- @registry.get(:foo, :missing).should be_nil
90
- end
91
- end
@@ -1,63 +0,0 @@
1
- # require File.dirname(__FILE__) + '/../spec_helper'
2
- #
3
- # describe "Routing Filter::Categories" do
4
- # include SpecRoutingHelper
5
- # #include SpecMocks
6
- #
7
- # describe "#before_recognize_path" do
8
- # before :each do
9
- # @category = mock_category
10
- # @categories_proxy = mock 'categories_proxy', :find_by_path => @category
11
- # @section = mock_section(:types => ['Page'], :categories => @categories_proxy)
12
- # Section.stub!(:find).and_return @section
13
- # Site.stub!(:find_by_host).and_return mock('site', :sections => mock('sections_proxy', :root => @section))
14
- #
15
- # end
16
- #
17
- # ['', '/de'].each do |locale|
18
- # describe "given an incoming section and category path with#{locale.blank? ? 'out' : ''} a locale (like #{locale}/sections/:section_id/categories/:category_path)" do
19
- # controller_name 'base'
20
- #
21
- # it "should replace the :category_path with the :category_id" do
22
- # before_recognize_path(:categories, "#{locale}/sections/1/categories/category").should == "#{locale}/sections/1/categories/1"
23
- # end
24
- #
25
- # it "should replace the :category_path with the :category_id when the path is terminated by a slash" do
26
- # before_recognize_path(:categories, "#{locale}/sections/1/categories/category/").should == "#{locale}/sections/1/categories/1/"
27
- # end
28
- #
29
- # it "should replace the :category_path with the :category_id when the path has trailing stuff" do
30
- # before_recognize_path(:categories, "#{locale}/sections/1/categories/category/whatever").should == "#{locale}/sections/1/categories/1/whatever"
31
- # end
32
- # end
33
- #
34
- # describe "given an incoming category path without a section segment and with#{locale.blank? ? "out" : ""} a locale (like #{locale}/categories/:category_path)" do
35
- # controller_name "base"
36
- #
37
- # it "should replace the :category_path with the :category_id and prepend the section segments" do
38
- # before_recognize_path(:categories, "#{locale}/categories/category").should == "#{locale}/sections/1/categories/1"
39
- # end
40
- #
41
- # it "should replace the :category_path with the :category_id and prepend the section segments when the path is terminated by a slash" do
42
- # before_recognize_path(:categories, "#{locale}/categories/category/").should == "#{locale}/sections/1/categories/1/"
43
- # end
44
- #
45
- # it "should replace the :category_path with the :category_id and prepend the section segments when the path has trailing stuff" do
46
- # before_recognize_path(:categories, "#{locale}/categories/category/whatever").should == "#{locale}/sections/1/categories/1/whatever"
47
- # end
48
- # end
49
- # end
50
- # end
51
- #
52
- # describe "#after_url_helper" do
53
- # controller_name 'base'
54
- #
55
- # before :each do
56
- # Category.stub!(:find).and_return mock_category
57
- # end
58
- #
59
- # it "should replace a categories/:category_id segment with categories/:category_path" do
60
- # after_url_helper(:categories, nil, '/categories/1').should == '/categories/category'
61
- # end
62
- # end
63
- # end
@@ -1,159 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../test_helper')
2
- $:.unshift File.expand_path(File.dirname(__FILE__) + '/../../../lib')
3
- require 'routing_filter/categories'
4
-
5
- module RoutingFilterTests
6
- class CategoriesAdminTest < ActiveSupport::TestCase
7
- def setup
8
- super
9
- @filter = RoutingFilter::Sets.new({})
10
- blog = Blog.first
11
- site = blog.site
12
- category = blog.categories.first
13
- @types = Section.types.map{|type| type.downcase.pluralize }.join('|')
14
- @category_path = "/admin/sites/#{site.id}/sections/#{blog.id}/categories/#{category.id}/edit"
15
- @category_locale_path = "/de/admin/sites/#{site.id}/sections/#{blog.id}/categories/#{category.id}/edit"
16
- end
17
-
18
- # around_recognize
19
-
20
- test "#around_recognize does not do any filtering if url starts with /admin" do
21
- mock(@filter).match_path(@category_path, @types).times(0)
22
-
23
- @filter.around_recognize(@category_path, 'test') { }
24
- end
25
-
26
- test "#around_recognize does not do any filtering if url starts with, for example - /de/admin" do
27
- mock(@filter).match_path(@category_locale_path, @types).times(0)
28
-
29
- @filter.around_recognize(@category_locale_path, 'test') { }
30
- end
31
-
32
- # around_generate
33
-
34
- test "#around_generate does not do any filtering if url starts with /admin" do
35
- assert_equal @filter.around_generate { @category_path.dup }, @category_path
36
- end
37
-
38
- test "#around_generate does not do any filtering if url starts with, for example - /de/admin" do
39
- assert_equal @filter.around_generate { @category_locale_path.dup }, @category_locale_path
40
- end
41
- end
42
-
43
- class CategoriesTest < ActiveSupport::TestCase
44
- def setup
45
- super
46
- @filter = RoutingFilter::Categories.new({})
47
- @base_route = "/blogs/1/categories/"
48
- end
49
-
50
- test "filter is a categories routing filter" do
51
- assert @filter.is_a?(RoutingFilter::Categories)
52
- end
53
-
54
- test "it correctly recognizes the category from url - standard category" do
55
- standard_category.each do |route|
56
- has_match_with_route(route)
57
- assert_equal 'a-category', @filter.match_path(@base_route + route, ['blogs'])[2]
58
- end
59
- end
60
-
61
- test "it correctly recognizes the category from url - child category" do
62
- child_category.each do |route|
63
- has_match_with_route(route)
64
- assert_equal 'a-category/child', @filter.match_path(@base_route + route, ['blogs'])[2]
65
- end
66
- end
67
-
68
- test "it correctly recognizes the category from url - category with digit" do
69
- category_with_digit.each do |route|
70
- has_match_with_route(route)
71
- assert_equal 'category-666', @filter.match_path(@base_route + route, ['blogs'])[2]
72
- end
73
- end
74
-
75
- test "it correctly recognizes the category from url - child category with digit" do
76
- child_category_with_digit.each do |route|
77
- has_match_with_route(route)
78
- assert_equal 'category-666/kid69', @filter.match_path(@base_route + route, ['blogs'])[2]
79
- end
80
- end
81
-
82
- test "it correctly recognizes the category from url - category with digits only" do
83
- digit_category.each do |route|
84
- has_match_with_route(route)
85
- assert_equal '1234', @filter.match_path(@base_route + route, ['blogs'])[2]
86
- end
87
- end
88
-
89
- test "it correctly recognizes the category from url - child category with digits only" do
90
- digit_child_category.each do |route|
91
- has_match_with_route(route)
92
- assert_equal '1234/567', @filter.match_path(@base_route + route, ['blogs'])[2]
93
- end
94
- end
95
-
96
- # test "it correctly recognizes the category from url - category with special characters" do
97
- # special_character_category.each do |route|
98
- # has_match_with_route(route)
99
- # assert_equal '$%&', @filter.match_path(@base_route + route, ['blogs'])[2]
100
- # end
101
- # end
102
- #
103
- # test "it correctly recognizes the category from url - child category with special characters" do
104
- # special_character_category.each do |route|
105
- # has_match_with_route(route)
106
- # assert_equal '$%&/§"!', @filter.match_path(@base_route + route, ['blogs'])[2]
107
- # end
108
- # end
109
-
110
- test "it fails to recognize four digit child categories" do
111
- assert_equal '1234', @filter.match_path(@base_route + "1234/5678", ['blogs'])[2]
112
- end
113
-
114
- test "it fails to recognize four and two digit parent child combinations under the root category level" do
115
- assert_equal '1234/56', @filter.match_path(@base_route + "1234/56", ['blogs'])[2]
116
- assert_equal '1234', @filter.match_path(@base_route + "1234/4567/89", ['blogs'])[2]
117
- end
118
-
119
- def has_match_with_route(route)
120
- assert @filter.match_path(@base_route + route, ['blogs']),
121
- "#{@base_route + route} does not match with categories routing filter"
122
- end
123
-
124
- def standard_category
125
- %w( a-category a-category/2009 a-category/2009/1 a-category/2009/12 a-category.atom a-category.html a-category.pdf )
126
- end
127
-
128
- def child_category
129
- %w( a-category/child a-category/child/2009 a-category/child/2009/1 a-category/child/2009/12 a-category/child.atom
130
- a-category/child.html a-category/child.pdf )
131
- end
132
-
133
- def category_with_digit
134
- %w( category-666 category-666/2009 category-666/2009/1 category-666/2009/12 category-666.atom
135
- category-666.html category-666.pdf )
136
- end
137
-
138
- def child_category_with_digit
139
- %w( category-666/kid69 category-666/kid69/2009 category-666/kid69/2009/1 category-666/kid69/2009/12
140
- category-666/kid69.atom category-666/kid69.html category-666/kid69.pdf )
141
- end
142
-
143
- def digit_category
144
- %w( 1234 1234/2009 1234/2009/1 1234/2009/12 1234.atom 1234.html 1234.pdf )
145
- end
146
-
147
- def digit_child_category
148
- %w( 1234/567 1234/567/2009 1234/567/2009/1 1234/567/2009/12 1234/567.atom 1234/567.html 1234/567.pdf )
149
- end
150
-
151
- def special_character_category
152
- %w( $%& $%&/2009 $%&/2009/1 $%&/2009/12 $%&.atom $%&.html $%&.pdf )
153
- end
154
-
155
- def special_character_children_category
156
- %w( $%&/§"!" $%&/§"!/2009 $%&/§"!/2009/1 $%&/§"!/2009/12 $%&/§"!.atom $%&/§"!.html $%&/§"!.pdf )
157
- end
158
- end
159
- end
@@ -1,73 +0,0 @@
1
- =begin
2
- require File.dirname(__FILE__) + '/../spec_helper'
3
-
4
- describe "Routing Filter::Locale" do
5
- include SpecRoutingHelper
6
-
7
- describe "#before_recognize_path" do
8
- describe "given an incoming root path" do
9
- controller_name 'base'
10
-
11
- it "should prepend the defaule_locale to the path when no locale is given (i.e. /)" do
12
- before_recognize(:locale, '/').should == '/en/'
13
- end
14
-
15
- it "should not modify the path when a locale given (i.e. /de)" do
16
- before_recognize(:locale, '/de').should == '/de'
17
- end
18
-
19
- it "should prepend the defaule_locale to the path when no locale but a similar path segment is given (i.e. /de-something)" do
20
- before_recognize(:locale, '/de-something').should == '/en/de-something'
21
- end
22
- end
23
- end
24
-
25
- describe "#before_url_helper" do
26
- controller_name 'base'
27
-
28
- before :each do
29
- @base = mock 'base'
30
- # @base.instance_variable_set :@locale, 'de'
31
- I18n.locale = :de
32
- end
33
-
34
- it "should unshift the current locale to the args when they are a non empty array" do
35
- before_url_helper(:locale, @base, ['foo']).should == ['de', 'foo']
36
- end
37
-
38
- it "should not modify the args when they are an empty array" do
39
- before_url_helper(:locale, @base, []).should == []
40
- end
41
-
42
- it "should not modify the args when they are an array with an options hash that contains the locale" do
43
- before_url_helper(:locale, @base, [{'locale' => 'en', 'foo' => 'bar'}]).should == [{'locale' => 'en', 'foo' => 'bar'}]
44
- end
45
-
46
- it "should set the current locale to the args when they are an array with an options hash that does not contain the locale" do
47
- before_url_helper(:locale, @base, [{'foo' => 'bar'}]).should == [{'locale' => 'de', 'foo' => 'bar'}]
48
- end
49
- end
50
-
51
- describe "#after_url_helper" do
52
- controller_name 'base'
53
-
54
- [['url', 'http://localhost:3000'], ['path', '']].each do |type, host|
55
- it "should not modify the generated #{type} if no locale is present" do
56
- after_url_helper(:locale, nil, "#{host}/something").should == "#{host}/something"
57
- end
58
-
59
- it "should not modify the generated path/url if the locale is not the default locale" do
60
- after_url_helper(:locale, nil, "#{host}/de/something").should == "#{host}/de/something"
61
- end
62
-
63
- it "should remove the default locale from the generated path/url if it's followed by end-of-line" do
64
- after_url_helper(:locale, nil, "#{host}/en").should == "#{host}/"
65
- end
66
-
67
- it "should remove the default locale from the generated path/url if it's followed by a slash" do
68
- after_url_helper(:locale, nil, "#{host}/en/").should == "#{host}/"
69
- end
70
- end
71
- end
72
- end
73
- =end
@@ -1,40 +0,0 @@
1
- # we're using a standard route instead of this filter now
2
-
3
- # require File.dirname(__FILE__) + '/../spec_helper'
4
- # require File.dirname(__FILE__) + '/../spec_routing_helper'
5
- # require File.dirname(__FILE__) + '/../spec_mocks'
6
- #
7
- # describe "Routing Filter::RootBlogArchive" do
8
- # include SpecRoutingHelper
9
- # include SpecMocks
10
- #
11
- # describe "#before_recognize_path" do
12
- # describe "given an incoming root blog archive path with no locale (like /2008/1)" do
13
- # controller_name 'base'
14
- #
15
- # it "should insert the blog path segment to the path when the root section is a blog" do
16
- # Site.should_receive(:find_by_host).and_return mock_site(mock_blog)
17
- # before_recognize_path(:root_blog_archive, '/2008/1').should == '/blog/2008/1'
18
- # end
19
- #
20
- # it "should not modify the path when the root section is not a blog" do
21
- # Site.should_receive(:find_by_host).and_return mock_site(mock_section)
22
- # before_recognize_path(:root_blog_archive, '/2008/1').should == '/2008/1'
23
- # end
24
- # end
25
- #
26
- # describe "given an incoming root blog archive path with a locale and trailing stuff (like /de/2008/1/something)" do
27
- # controller_name 'base'
28
- #
29
- # it "should insert the blog path segment to the path when the root section is a blog" do
30
- # Site.should_receive(:find_by_host).and_return mock_site(mock_blog)
31
- # before_recognize_path(:root_blog_archive, '/de/2008/1/something').should == '/de/blog/2008/1/something'
32
- # end
33
- #
34
- # it "should not modify the path when the root section is not a blog" do
35
- # Site.should_receive(:find_by_host).and_return mock_site(mock_section)
36
- # before_recognize_path(:root_blog_archive, '/de/2008/1/something').should == '/de/2008/1/something'
37
- # end
38
- # end
39
- # end
40
- # end
@@ -1,48 +0,0 @@
1
- =begin
2
- return nil
3
- require File.dirname(__FILE__) + '/../spec_helper'
4
- #require File.dirname(__FILE__) + '/../spec_mocks'
5
-
6
- describe "Routing Filter::RootSectionArticles" do
7
- include SpecRoutingHelper
8
- #include SpecMocks
9
-
10
- describe "#before_recognize_path" do
11
- describe "given an incoming root article permalink path with no locale (like /an-article)" do
12
- controller_name 'base'
13
-
14
- before :each do
15
- @section = mock_section(:articles => mock('articles_proxy', :permalinks => ['an-article']))
16
- Site.should_receive(:find_by_host).and_return mock_site(@section)
17
- end
18
-
19
- it "should insert the section path segment to the path when the article belongs to the root section" do
20
- before_recognize_path(:root_section_articles, '/an-article').should == '/section/an-article'
21
- end
22
-
23
- it "should not modify the path when the article does not belong to the root section" do
24
- @section.articles.should_receive(:permalinks).and_return ['another-article']
25
- before_recognize_path(:root_section_articles, '/an-article').should == '/an-article'
26
- end
27
- end
28
-
29
- describe "given an incoming root article permalink path with a locale (like /de/an-article)" do
30
- controller_name 'base'
31
-
32
- before :each do
33
- @section = mock_section(:articles => mock('articles_proxy', :permalinks => ['an-article']))
34
- Site.should_receive(:find_by_host).and_return mock_site(@section)
35
- end
36
-
37
- it "should insert the section path segment to the path when the article belongs to the root section" do
38
- before_recognize_path(:root_section_articles, '/de/an-article').should == '/de/section/an-article'
39
- end
40
-
41
- it "should not modify the path when the article does not belong to the root section" do
42
- @section.articles.should_receive(:permalinks).and_return ['another-article']
43
- before_recognize_path(:root_section_articles, '/de/an-article').should == '/de/an-article'
44
- end
45
- end
46
- end
47
- end
48
- =end
@@ -1,40 +0,0 @@
1
- # we're using a standard route instead of this filter now
2
-
3
- # require File.dirname(__FILE__) + '/../spec_helper'
4
- # require File.dirname(__FILE__) + '/../spec_routing_helper'
5
- # require File.dirname(__FILE__) + '/../spec_mocks'
6
- #
7
- # describe "Routing Filter::RootWikipages" do
8
- # include SpecRoutingHelper
9
- # include SpecMocks
10
- #
11
- # describe "#before_recognize_path" do
12
- # describe "given an incoming root wikipage path with no locale (like /pages/something)" do
13
- # controller_name 'base'
14
- #
15
- # it "should insert the section path segment to the path when the root section is a wiki" do
16
- # Site.should_receive(:find_by_host).and_return mock_site(mock_wiki)
17
- # before_recognize_path(:root_wikipages, '/pages/something').should == '/wiki/pages/something'
18
- # end
19
- #
20
- # it "should not modify the path when the root section is not a wiki" do
21
- # Site.should_receive(:find_by_host).and_return mock_site(mock_section)
22
- # before_recognize_path(:root_wikipages, '/pages/something').should == '/pages/something'
23
- # end
24
- # end
25
- #
26
- # describe "given an incoming root wikipage path with a locale (like /de/pages/something)" do
27
- # controller_name 'base'
28
- #
29
- # it "should insert the section path segment to the path when the root section is a wiki" do
30
- # Site.should_receive(:find_by_host).and_return mock_site(mock_wiki)
31
- # before_recognize_path(:root_wikipages, '/de/pages/something').should == '/de/wiki/pages/something'
32
- # end
33
- #
34
- # it "should not modify the path when the root section is not a wiki" do
35
- # Site.should_receive(:find_by_host).and_return mock_site(mock_section)
36
- # before_recognize_path(:root_wikipages, '/de/pages/something').should == '/de/pages/something'
37
- # end
38
- # end
39
- # end
40
- # end
@@ -1,143 +0,0 @@
1
- =begin
2
- require File.dirname(__FILE__) + '/../spec_helper'
3
- #require File.dirname(__FILE__) + '/../spec_mocks'
4
-
5
- describe "Routing Filter::Sections" do
6
- include SpecRoutingHelper
7
- #include SpecMocks
8
-
9
- describe "#before_recognize_path" do
10
- before :each do
11
- stub_scenario :site
12
- @site.sections.stub!(:paths).and_return ['section', 'section/subsection']
13
- end
14
-
15
- describe "given an incoming root path" do
16
- controller_name 'base'
17
- before :each do
18
- Site.should_receive(:find_by_host).with('test.host').and_return mock_site
19
- end
20
-
21
- it "should rewrite the path to /:root_section_pat when no locale is given (i.e. /)" do
22
- before_recognize_path(:sections, '/').should == '/sections/1'
23
- end
24
-
25
- it "should rewrite the path to /sections/:root_section_id when a locale given (i.e. /de)" do
26
- before_recognize_path(:sections, '/de').should == '/de/sections/1'
27
- end
28
-
29
- it "should rewrite the path to /sections/:root_section_id when a locale and a trailing slash are given (i.e. /de/)" do
30
- before_recognize_path(:sections, '/de/').should == '/de/sections/1'
31
- end
32
- end
33
-
34
- describe "given an incoming section path" do
35
- before :each do
36
- Site.should_receive(:find_by_host).with('test.host').and_return mock_section
37
- end
38
-
39
- describe "without a locale (like /section)" do
40
- controller_name 'base'
41
-
42
- it "should rewrite the path to /sections/:section_id" do
43
- before_recognize_path(:sections, '/section').should == '/sections/1'
44
- end
45
-
46
- it "should rewrite the path to /sections/:section_id leaving trailing stuff as is" do
47
- before_recognize_path(:sections, '/section/something').should == '/sections/1/something'
48
- end
49
- end
50
-
51
- describe "with a locale (like /en/section)" do
52
- controller_name 'base'
53
-
54
- it "should rewrite the path to /:locale/sections/:section_id" do
55
- before_recognize_path(:sections, '/en/section').should == '/en/sections/1'
56
- end
57
-
58
- it "should rewrite the path to /:locale/sections/:section_id leaving trailing stuff as is" do
59
- before_recognize_path(:sections, '/en/section/something').should == '/en/sections/1/something'
60
- end
61
- end
62
- end
63
-
64
- describe "given an incoming nested section path" do
65
- before :each do
66
- Site.should_receive(:find_by_host).with('test.host').and_return mock_section
67
- end
68
-
69
- describe "without a locale (like /section/subsection)" do
70
- controller_name 'base'
71
-
72
- it "should rewrite the path to /sections/:section_id" do
73
- before_recognize_path(:sections, '/section/subsection').should == '/sections/1'
74
- end
75
-
76
- it "should rewrite the path to /sections/:section_id leaving trailing stuff as is" do
77
- before_recognize_path(:sections, '/section/subsection/something').should == '/sections/1/something'
78
- end
79
- end
80
-
81
- describe "with a locale (like /en/section/subsection)" do
82
- controller_name 'base'
83
-
84
- it "should rewrite the path to /:locale/sections/:section_id" do
85
- before_recognize_path(:sections, '/en/section/subsection').should == '/en/sections/1'
86
- end
87
-
88
- it "should rewrite the path to /:locale/sections/:section_id leaving trailing stuff as is" do
89
- before_recognize_path(:sections, '/en/section/subsection/something').should == '/en/sections/1/something'
90
- end
91
- end
92
- end
93
- end
94
-
95
- describe "#after_url_helper" do
96
- before :each do
97
- @section = mock_section
98
- Section.stub!(:types).and_return ['Page']
99
- Section.should_receive(:find).with("1").and_return @section
100
- end
101
-
102
- [['path', ''], ['url', 'http://localhost:3000']].each do |type, host|
103
- describe "given a generated section #{type}" do
104
- [['without a locale', ''], ['with a locale', '/de']].each do |locale_text, locale|
105
- describe "#{locale_text} (like #{host}#{locale}/sections/1)" do
106
- describe "when the section is not the root section" do
107
- controller_name 'base'
108
-
109
- before :each do
110
- @section.should_receive(:root_section?).and_return(false)
111
- end
112
-
113
- it "should rewrite the path to #{host}#{locale}/:page_path" do
114
- after_url_helper(:sections, nil, "#{host}#{locale}/sections/1").should == "#{host}#{locale}/section/"
115
- end
116
-
117
- it "should rewrite the path to #{host}#{locale}/page_path leaving trailing stuff as is" do
118
- after_url_helper(:sections, nil, "#{host}#{locale}/sections/1/something").should == "#{host}#{locale}/section/something"
119
- end
120
- end
121
-
122
- describe "when the section is the root section" do
123
- controller_name "base"
124
-
125
- before :each do
126
- @section.should_receive(:root_section?).and_return(true)
127
- end
128
-
129
- it "should rewrite the path to #{host}#{locale}/" do
130
- after_url_helper(:sections, nil, "#{host}#{locale}/sections/1").should == "#{host}#{locale}/"
131
- end
132
-
133
- it "should rewrite the path to #{host}#{locale}/ leaving trailing stuff as is" do
134
- after_url_helper(:sections, nil, "#{host}#{locale}/sections/1/something").should == "#{host}#{locale}/something"
135
- end
136
- end
137
- end
138
- end
139
- end
140
- end
141
- end
142
- end
143
- =end