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.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +60 -0
- data/.gitignore +3 -0
- data/.rspec +3 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/AGENTS.md +41 -0
- data/Appraisals +4 -0
- data/CHANGELOG +1 -1
- data/CLAUDE.md +79 -0
- data/Gemfile +1 -2
- data/README.md +203 -0
- data/Rakefile +30 -0
- data/adva.gemspec +22 -5
- data/app/assets/javascripts/adva_cms.js +1 -0
- data/app/assets/stylesheets/adva_cms/layout/login.scss +1 -1
- data/app/controllers/admin/articles_controller.rb +3 -0
- data/app/controllers/admin/base_controller.rb +1 -9
- data/app/controllers/admin/ckeditor_controller.rb +11 -0
- data/app/controllers/admin/page/articles_controller.rb +26 -53
- data/app/controllers/admin/page/categories_controller.rb +28 -11
- data/app/controllers/admin/page/contents_controller.rb +5 -14
- data/app/controllers/admin/page/links_controller.rb +13 -16
- data/app/controllers/admin/sections_controller.rb +15 -10
- data/app/controllers/admin/sites_controller.rb +38 -15
- data/app/controllers/admin/users_controller.rb +14 -8
- data/app/controllers/articles_controller.rb +3 -3
- data/app/controllers/base_controller.rb +2 -5
- data/app/controllers/password_controller.rb +24 -8
- data/app/controllers/session_controller.rb +18 -8
- data/app/helpers/activities_helper.rb +4 -20
- data/app/helpers/admin/base_helper.rb +3 -3
- data/app/helpers/base_helper.rb +16 -16
- data/app/helpers/content_helper.rb +16 -16
- data/app/helpers/resource_helper.rb +9 -9
- data/app/helpers/users_helper.rb +3 -3
- data/app/models/activity.rb +4 -4
- data/app/models/article.rb +3 -1
- data/app/models/categorization.rb +1 -1
- data/app/models/category.rb +6 -6
- data/app/models/content.rb +66 -23
- data/app/models/page.rb +3 -3
- data/app/models/password_mailer.rb +8 -8
- data/app/models/section.rb +17 -16
- data/app/models/site.rb +15 -26
- data/app/models/tag.rb +5 -0
- data/app/models/user.rb +43 -18
- data/app/models/user_session.rb +19 -0
- data/app/views/admin/activities/_activities.html.slim +15 -0
- data/app/views/admin/activities/_comment.html.slim +25 -0
- data/app/views/admin/activities/_content.html.slim +17 -0
- data/app/views/admin/activities/_topic.html.slim +17 -0
- data/app/views/admin/page/articles/_form.html.slim +40 -0
- data/app/views/admin/page/articles/_options.html.slim +9 -0
- data/app/views/admin/page/articles/edit.html.slim +11 -0
- data/app/views/admin/page/articles/new.html.slim +9 -0
- data/app/views/admin/page/categories/edit.html.slim +15 -0
- data/app/views/admin/page/categories/index.html.slim +14 -0
- data/app/views/admin/page/categories/new.html.slim +14 -0
- data/app/views/admin/page/contents/index.html.slim +18 -0
- data/app/views/admin/page/links/_form.html.slim +18 -0
- data/app/views/admin/page/links/_options.html.slim +8 -0
- data/app/views/admin/page/links/edit.html.slim +9 -0
- data/app/views/admin/page/links/new.html.slim +9 -0
- data/app/views/admin/sections/_form.html.slim +22 -0
- data/app/views/admin/sections/edit.html.slim +6 -0
- data/app/views/admin/sections/index.html.slim +17 -0
- data/app/views/admin/sections/new.html.slim +22 -0
- data/app/views/admin/sections/settings/_page.html.slim +9 -0
- data/app/views/admin/shared/_header.html.slim +16 -0
- data/app/views/admin/shared/_section.html.slim +5 -0
- data/app/views/admin/shared/_section_tree.html.slim +15 -0
- data/app/views/admin/sites/_email_notifications.html.slim +7 -0
- data/app/views/admin/sites/_form.html.slim +12 -0
- data/app/views/admin/sites/_recent_users.html.slim +11 -0
- data/app/views/admin/sites/_sections.html.slim +6 -0
- data/app/views/admin/sites/_unapproved_comments.html.slim +7 -0
- data/app/views/admin/sites/edit.html.slim +3 -0
- data/app/views/admin/sites/index.html.slim +13 -0
- data/app/views/admin/sites/multi_sites_disabled.html.slim +11 -0
- data/app/views/admin/sites/new.html.slim +18 -0
- data/app/views/admin/sites/show.html.slim +11 -0
- data/app/views/admin/users/_form.html.slim +12 -0
- data/app/views/admin/users/_sidebar.html.slim +4 -0
- data/app/views/admin/users/edit.html.slim +6 -0
- data/app/views/admin/users/index.html.slim +13 -0
- data/app/views/admin/users/new.html.slim +4 -0
- data/app/views/admin/users/show.html.slim +23 -0
- data/app/views/categories/_checkboxes.html.slim +9 -0
- data/app/views/comments/_form.html.slim +3 -0
- data/app/views/comments/_list.html.slim +3 -0
- data/app/views/layouts/admin.html.slim +50 -0
- data/app/views/layouts/application.html.slim +7 -0
- data/app/views/layouts/login.html.slim +23 -0
- data/app/views/pages/articles/index.html.slim +8 -0
- data/app/views/pages/articles/show.html.slim +14 -0
- data/app/views/password/edit.html.slim +19 -0
- data/app/views/password/new.html.slim +10 -0
- data/app/views/password_mailer/reset_password_email.html.slim +21 -0
- data/app/views/password_mailer/updated_password_email.html.slim +3 -0
- data/app/views/session/new.html.slim +14 -0
- data/app/views/shared/_flash.html.slim +2 -0
- data/app/views/shared/_menu.html.slim +6 -0
- data/app/views/shared/_sidebar.html.slim +14 -0
- data/bin/setup +7 -0
- data/config/environment.rb +8 -8
- data/config/initializers/ckeditor.rb +12 -5
- data/config/initializers/menus.rb +58 -66
- data/config/initializers/time_format.rb +1 -1
- data/config/routes.rb +16 -21
- data/db/migrate/20080401000000_create_activities_table.rb +7 -7
- data/db/migrate/20080401000001_create_sites_table.rb +2 -2
- data/db/migrate/20080401000002_create_sections_table.rb +3 -3
- data/db/migrate/20080401000003_create_contents_table.rb +12 -11
- data/db/migrate/20080401000004_create_categories_table.rb +3 -3
- data/db/migrate/20080401000005_create_category_assignments.rb +1 -1
- data/db/migrate/20080401000006_create_taggable_tables.rb +29 -26
- data/db/migrate/20080402000001_create_users_table.rb +11 -11
- data/db/migrate/20080402000005_create_memberships_table.rb +3 -3
- data/db/migrate/20080710000000_create_plugin_configs.rb +3 -3
- data/db/migrate/20080715131051_plugin_owner_column.rb +3 -3
- data/db/migrate/20081208161500_add_content_type_to_join_tables.rb +4 -4
- data/db/migrate/20090216114034_rename_category_assignment_to_categorization.rb +1 -1
- data/db/migrate/20090218083515_add_metatags_to_contents.rb +1 -1
- data/db/migrate/20090305123429_move_sections_to_pages.rb +3 -3
- data/db/migrate/20090519132700_add_published_at_to_sections.rb +3 -3
- data/db/migrate/20090522082000_add_metatags_to_sites.rb +2 -2
- data/db/migrate/20090625124502_create_accounts.rb +2 -2
- data/db/migrate/20090625133231_add_account_to_user.rb +1 -1
- data/db/migrate/20090702085459_create_section_translations.rb +3 -3
- data/db/migrate/20090702200226_create_category_translations.rb +3 -3
- data/db/migrate/20090707171100_upgrade_paperclip_paths.rb +3 -26
- data/db/migrate/20090709111934_add_email_notification_to_site.rb +5 -5
- data/db/migrate/20091026000906_add_nesting_to_articles.rb +4 -12
- data/db/migrate/20140721000000_add_title_to_contents.rb +1 -1
- data/db/migrate/20161227203152_add_timestamps_to_categories.rb +1 -1
- data/db/migrate/20241224000001_add_admin_to_users.rb +5 -0
- data/db/migrate/20241224000002_add_timestamps_to_sites.rb +5 -0
- data/db/migrate/20241224000003_add_timestamps_to_sections.rb +5 -0
- data/db/migrate/20241224000004_add_hidden_on_global_nav_to_sections.rb +5 -0
- data/db/migrate/20241224000005_widen_activities_author_columns.rb +6 -0
- data/db/migrate/20260408000001_upgrade_taggable_tables_for_acts_as_taggable_on.rb +55 -0
- data/db/migrate/20260720000001_widen_users_password_hash.rb +11 -0
- data/db/migrate/20260729000001_add_authlogic_tokens_to_users.rb +36 -0
- data/doc/NOTES +8 -8
- data/doc/testing.txt +66 -50
- data/gemfiles/rails_8_1.gemfile +8 -0
- data/lib/adva/authenticate_user.rb +52 -90
- data/lib/adva/belongs_to_author.rb +1 -1
- data/lib/adva/crypto_providers/bcrypt.rb +42 -0
- data/lib/adva/crypto_providers/legacy_salted_sha1.rb +31 -0
- data/lib/adva/extensible_forms.rb +17 -17
- data/lib/adva/has_options.rb +3 -4
- data/lib/adva/override.rb +55 -0
- data/lib/adva/version.rb +1 -1
- data/lib/adva.rb +10 -6
- data/lib/rails_ext/action_controller/default_params.rb +1 -1
- data/lib/rails_ext/action_controller/event_helper.rb +1 -1
- data/lib/rails_ext/action_controller/render_with_error_proc.rb +3 -3
- data/lib/rails_ext/action_controller/url_for_returning.rb +1 -1
- data/lib/rails_ext.rb +4 -5
- data/{test → spec}/fixtures/templates/menu/shared/_menu.html.erb +1 -1
- data/spec/helpers/activities_helper_more_spec.rb +41 -0
- data/spec/helpers/activities_helper_spec.rb +44 -0
- data/spec/helpers/admin/base_helper_spec.rb +14 -0
- data/spec/helpers/admin_base_helper_more_spec.rb +37 -0
- data/spec/helpers/base_helper_spec.rb +120 -0
- data/spec/helpers/content_helper_checkbox_spec.rb +21 -0
- data/spec/helpers/content_helper_more_spec.rb +104 -0
- data/spec/helpers/content_helper_spec.rb +14 -0
- data/spec/helpers/resource_helper_links_to_actions_spec.rb +13 -0
- data/spec/helpers/resource_helper_paths_spec.rb +21 -0
- data/spec/helpers/resource_helper_spec.rb +101 -0
- data/spec/helpers/users_helper_gravatar_spec.rb +18 -0
- data/spec/helpers/users_helper_spec.rb +55 -0
- data/spec/internal/.gitignore +3 -0
- data/spec/internal/app/assets/config/manifest.js +3 -0
- data/spec/internal/app/assets/images/.keep +0 -0
- data/spec/internal/app/assets/javascripts/.keep +0 -0
- data/spec/internal/app/assets/stylesheets/.keep +0 -0
- data/spec/internal/app/controllers/application_controller.rb +8 -0
- data/spec/internal/config/application.rb +26 -0
- data/spec/internal/config/database.yml +5 -0
- data/spec/internal/config/environment.rb +75 -0
- data/spec/internal/db/seed_for_tests.rb +12 -0
- data/{test → spec}/javascript/lib/jstest.rb +81 -81
- data/{test → spec}/javascript/templates/test_case.erb +1 -1
- data/spec/lib/adva_event_spec.rb +61 -0
- data/spec/lib/adva_override_spec.rb +197 -0
- data/spec/lib/authenticate_user_comprehensive_spec.rb +133 -0
- data/spec/lib/authenticate_user_cookies_spec.rb +40 -0
- data/spec/lib/base_controller_cache_spec.rb +20 -0
- data/spec/lib/base_controller_pagination_spec.rb +24 -0
- data/spec/lib/crypto_providers_spec.rb +104 -0
- data/spec/lib/extensible_forms_spec.rb +133 -0
- data/spec/lib/has_options_spec.rb +18 -0
- data/spec/lib/rails_ext_event_helper_spec.rb +24 -0
- data/spec/lib/rails_ext_render_with_error_proc_spec.rb +68 -0
- data/spec/lib/rails_ext_url_for_returning_spec.rb +20 -0
- data/spec/models/activity_spec.rb +171 -0
- data/spec/models/article_spec.rb +75 -0
- data/spec/models/belongs_to_author_spec.rb +24 -0
- data/spec/models/categorization_spec.rb +71 -0
- data/spec/models/category_spec.rb +273 -0
- data/spec/models/content_activity_logging_spec.rb +64 -0
- data/spec/models/content_additional_coverage_spec.rb +152 -0
- data/spec/models/content_permalink_spec.rb +24 -0
- data/spec/models/content_spec.rb +334 -0
- data/spec/models/link_spec.rb +53 -0
- data/spec/models/membership_spec.rb +53 -0
- data/spec/models/page_spec.rb +196 -0
- data/spec/models/password_mailer_spec.rb +162 -0
- data/spec/models/section_published_spec.rb +31 -0
- data/spec/models/section_spec.rb +77 -0
- data/spec/models/site_find_by_host_spec.rb +32 -0
- data/spec/models/site_spec.rb +53 -0
- data/spec/models/tag_spec.rb +16 -0
- data/spec/models/user_additional_coverage_spec.rb +264 -0
- data/spec/models/user_spec.rb +250 -0
- data/spec/rails_helper.rb +42 -0
- data/spec/requests/admin_articles_crud_spec.rb +63 -0
- data/spec/requests/admin_articles_spec.rb +12 -0
- data/spec/requests/admin_base_controller_additional_coverage_spec.rb +69 -0
- data/spec/requests/admin_base_controller_spec.rb +84 -0
- data/spec/requests/admin_categories_crud_spec.rb +32 -0
- data/spec/requests/admin_categories_spec.rb +13 -0
- data/spec/requests/admin_install_spec.rb +25 -0
- data/spec/requests/admin_page_articles_more_spec.rb +53 -0
- data/spec/requests/admin_page_categories_controller_spec.rb +21 -0
- data/spec/requests/admin_page_categories_update_all_spec.rb +94 -0
- data/spec/requests/admin_page_contents_controller_spec.rb +85 -0
- data/spec/requests/admin_page_contents_spec.rb +13 -0
- data/spec/requests/admin_page_contents_update_all_spec.rb +28 -0
- data/spec/requests/admin_page_links_spec.rb +84 -0
- data/spec/requests/admin_pages_spec.rb +13 -0
- data/spec/requests/admin_sections_authorized_spec.rb +13 -0
- data/spec/requests/admin_sections_controller_spec.rb +111 -0
- data/spec/requests/admin_sections_crud_paths_spec.rb +48 -0
- data/spec/requests/admin_sections_crud_spec.rb +20 -0
- data/spec/requests/admin_sections_spec.rb +12 -0
- data/spec/requests/admin_sections_update_all_spec.rb +29 -0
- data/spec/requests/admin_sites_authorized_spec.rb +13 -0
- data/spec/requests/admin_sites_controller_spec.rb +202 -0
- data/spec/requests/admin_sites_crud_spec.rb +37 -0
- data/spec/requests/admin_sites_failures_spec.rb +45 -0
- data/spec/requests/admin_sites_spec.rb +18 -0
- data/spec/requests/admin_users_crud_spec.rb +33 -0
- data/spec/requests/admin_users_failures_spec.rb +27 -0
- data/spec/requests/admin_users_spec.rb +35 -0
- data/spec/requests/articles_spec.rb +344 -0
- data/spec/requests/articles_tags_categories_spec.rb +40 -0
- data/spec/requests/base_controller_additional_coverage_spec.rb +295 -0
- data/spec/requests/base_controller_spec.rb +344 -0
- data/spec/requests/base_controller_unpublished_spec.rb +17 -0
- data/spec/requests/forgery_protection_spec.rb +85 -0
- data/spec/requests/page_articles_spec.rb +22 -0
- data/spec/requests/password_spec.rb +133 -0
- data/spec/requests/perishable_token_login_spec.rb +49 -0
- data/spec/requests/session_spec.rb +170 -0
- data/spec/requests/token_login_spec.rb +54 -0
- data/spec/spec_helper.rb +38 -0
- data/{test/plugins → spec/support}/adva_url_history/init_url_history.rb +2 -2
- data/spec/support/auth.rb +14 -0
- data/spec/support/failure_dump.rb +20 -0
- data/vendor/gems/belongs_to_cacheable/README.md +115 -4
- data/vendor/gems/belongs_to_cacheable/Rakefile +4 -0
- data/vendor/gems/belongs_to_cacheable/belongs_to_cacheable.gemspec +4 -2
- data/vendor/gems/belongs_to_cacheable/lib/active_record/belongs_to_cacheable.rb +2 -2
- data/vendor/gems/belongs_to_cacheable/spec/belongs_to_cacheable_spec.rb +29 -7
- data/vendor/gems/belongs_to_cacheable/spec/spec_helper.rb +15 -10
- data/vendor/gems/cacheable_flash/.rspec +3 -0
- data/vendor/gems/cacheable_flash/README.md +54 -4
- data/vendor/gems/cacheable_flash/Rakefile +4 -3
- data/vendor/gems/cacheable_flash/cacheable_flash.gemspec +7 -10
- data/vendor/gems/cacheable_flash/lib/cacheable_flash/middleware.rb +1 -1
- data/vendor/gems/cacheable_flash/spec/cacheable_flash/middleware_spec.rb +45 -0
- data/vendor/gems/cacheable_flash/spec/cacheable_flash/version_spec.rb +10 -0
- data/vendor/gems/cacheable_flash/spec/spec_helper.rb +26 -0
- data/vendor/gems/table_builder/README.md +212 -16
- data/vendor/gems/table_builder/Rakefile +4 -0
- data/vendor/gems/table_builder/lib/table_builder/body.rb +17 -4
- data/vendor/gems/table_builder/lib/table_builder/cell.rb +1 -1
- data/vendor/gems/table_builder/lib/table_builder/column.rb +3 -3
- data/vendor/gems/table_builder/lib/table_builder/head.rb +3 -3
- data/vendor/gems/table_builder/lib/table_builder/row.rb +5 -5
- data/vendor/gems/table_builder/lib/table_builder/rows.rb +5 -5
- data/vendor/gems/table_builder/lib/table_builder/table.rb +8 -8
- data/vendor/gems/table_builder/lib/table_builder/tag.rb +17 -9
- data/vendor/gems/table_builder/lib/table_builder.rb +14 -5
- data/vendor/gems/table_builder/spec/spec_helper.rb +111 -0
- data/vendor/gems/table_builder/{test → spec/support}/fixtures/templates/table_all.html.erb +6 -6
- data/vendor/gems/table_builder/{test → spec/support}/fixtures/templates/table_simple.html.erb +1 -1
- data/vendor/gems/table_builder/spec/table_builder_spec.rb +294 -0
- data/vendor/gems/table_builder/table_builder.gemspec +10 -2
- data/vendor/gems/tags/README.md +205 -15
- data/vendor/gems/tags/Rakefile +4 -0
- data/vendor/gems/tags/lib/breadcrumbs.rb +4 -4
- data/vendor/gems/tags/lib/menu/builder.rb +10 -10
- data/vendor/gems/tags/lib/menu.rb +10 -10
- data/vendor/gems/tags/spec/breadcrumbs_spec.rb +19 -0
- data/vendor/gems/tags/spec/menu_base_spec.rb +42 -0
- data/vendor/gems/tags/spec/menu_builder_spec.rb +77 -0
- data/vendor/gems/tags/spec/menu_spec.rb +173 -0
- data/vendor/gems/tags/spec/node_spec.rb +53 -0
- data/vendor/gems/tags/spec/sections_menu_spec.rb +125 -0
- data/vendor/gems/tags/spec/spec_helper.rb +53 -0
- data/vendor/gems/tags/spec/tag_spec.rb +31 -0
- data/vendor/gems/tags/tags.gemspec +10 -2
- metadata +550 -1171
- data/README +0 -245
- data/app/models/activity_notifier.rb +0 -11
- data/app/observers/activities/activity_observer.rb +0 -25
- data/app/observers/activities/article_observer.rb +0 -20
- data/app/observers/activities/comment_observer.rb +0 -33
- data/app/observers/activities/logger.rb +0 -94
- data/app/observers/activities/section_observer.rb +0 -9
- data/app/views/activity_notifier/new_content_notification.html.erb +0 -5
- data/app/views/admin/activities/_activities.html.erb +0 -10
- data/app/views/admin/activities/_comment.html.erb +0 -35
- data/app/views/admin/activities/_content.html.erb +0 -16
- data/app/views/admin/activities/_topic.html.erb +0 -16
- data/app/views/admin/install/confirmation.html.erb +0 -10
- data/app/views/admin/install/index.html.erb +0 -38
- data/app/views/admin/page/articles/_form.html.erb +0 -43
- data/app/views/admin/page/articles/_options.html.erb +0 -19
- data/app/views/admin/page/articles/edit.html.erb +0 -15
- data/app/views/admin/page/articles/new.html.erb +0 -12
- data/app/views/admin/page/categories/edit.html.erb +0 -22
- data/app/views/admin/page/categories/index.html.erb +0 -23
- data/app/views/admin/page/categories/new.html.erb +0 -21
- data/app/views/admin/page/contents/index.html.erb +0 -25
- data/app/views/admin/page/links/_form.html.erb +0 -26
- data/app/views/admin/page/links/_options.html.erb +0 -20
- data/app/views/admin/page/links/edit.html.erb +0 -12
- data/app/views/admin/page/links/new.html.erb +0 -12
- data/app/views/admin/sections/_form.html.haml +0 -19
- data/app/views/admin/sections/edit.html.haml +0 -6
- data/app/views/admin/sections/index.html.erb +0 -27
- data/app/views/admin/sections/new.html.erb +0 -31
- data/app/views/admin/sections/settings/_page.html.haml +0 -8
- data/app/views/admin/shared/_header.html.erb +0 -20
- data/app/views/admin/shared/_section.html.erb +0 -8
- data/app/views/admin/shared/_section_tree.html.erb +0 -23
- data/app/views/admin/sites/_email_notifications.html.erb +0 -8
- data/app/views/admin/sites/_form.html.erb +0 -15
- data/app/views/admin/sites/_recent_users.html.erb +0 -13
- data/app/views/admin/sites/_sections.html.erb +0 -10
- data/app/views/admin/sites/_unapproved_comments.html.erb +0 -10
- data/app/views/admin/sites/edit.html.erb +0 -4
- data/app/views/admin/sites/index.html.erb +0 -21
- data/app/views/admin/sites/multi_sites_disabled.html.erb +0 -11
- data/app/views/admin/sites/new.html.erb +0 -21
- data/app/views/admin/sites/show.html.erb +0 -13
- data/app/views/admin/users/_form.html.erb +0 -15
- data/app/views/admin/users/_sidebar.html.erb +0 -8
- data/app/views/admin/users/edit.html.erb +0 -7
- data/app/views/admin/users/index.html.erb +0 -13
- data/app/views/admin/users/new.html.erb +0 -5
- data/app/views/admin/users/show.html.erb +0 -27
- data/app/views/categories/_checkboxes.html.erb +0 -12
- data/app/views/layouts/admin.html.haml +0 -48
- data/app/views/layouts/login.html.erb +0 -26
- data/app/views/pages/articles/index.html.erb +0 -10
- data/app/views/pages/articles/show.html.erb +0 -17
- data/app/views/password/edit.html.erb +0 -24
- data/app/views/password/new.html.erb +0 -13
- data/app/views/password_mailer/reset_password_email.html.erb +0 -23
- data/app/views/password_mailer/updated_password_email.html.erb +0 -3
- data/app/views/session/new.html.erb +0 -17
- data/app/views/shared/_flash.html.erb +0 -3
- data/app/views/shared/_menu.html.erb +0 -10
- data/app/views/shared/_sidebar.html.erb +0 -19
- data/config/initializers/settings.rb +0 -26
- data/lib/tasks/adva.rake +0 -183
- data/test/NOTES +0 -56
- data/test/adva_user_contexts.rb +0 -42
- data/test/adva_user_fixtures.rb +0 -18
- data/test/contexts.rb +0 -365
- data/test/fixtures.rb +0 -190
- data/test/functional/admin/articles_controller_test.rb +0 -329
- data/test/functional/admin/base_controller_test.rb +0 -68
- data/test/functional/admin/cached_pages_controller_test.rb +0 -66
- data/test/functional/admin/categories_controller_test.rb +0 -164
- data/test/functional/admin/cells_controller_spec.rb +0 -32
- data/test/functional/admin/install_controller_test.rb +0 -85
- data/test/functional/admin/plugins_controller_test.rb +0 -93
- data/test/functional/admin/sections_controller_test.rb +0 -201
- data/test/functional/admin/sites_controller_test.rb +0 -240
- data/test/functional/admin/users_controller_test.rb +0 -176
- data/test/functional/asset_tag_expansions_test.rb +0 -82
- data/test/functional/base_controller_test.rb +0 -73
- data/test/functional/page_articles_controller_test.rb +0 -168
- data/test/functional/page_articles_routes_test.rb +0 -73
- data/test/functional/password_controller_test.rb +0 -96
- data/test/functional/session_controller_test.rb +0 -1
- data/test/functional/user_controller_test.rb +0 -95
- data/test/integration/admin/cached_pages_test.rb +0 -43
- data/test/integration/admin/categories_test.rb +0 -66
- data/test/integration/admin/custom_templates_test.rb +0 -42
- data/test/integration/admin/filtering_articles_test.rb +0 -32
- data/test/integration/admin/plugins.rb +0 -32
- data/test/integration/admin/section_article_test.rb +0 -150
- data/test/integration/admin/section_test.rb +0 -88
- data/test/integration/admin/sites_test.rb +0 -48
- data/test/integration/anonymous_login_test.rb +0 -39
- data/test/integration/edit_user_test.rb +0 -44
- data/test/integration/installation_test.rb +0 -109
- data/test/integration/memberships_test.rb +0 -52
- data/test/integration/page_article_comment_test.rb +0 -51
- data/test/integration/page_article_test.rb +0 -87
- data/test/integration/section_index_test.rb +0 -37
- data/test/integration/user_deletion_test.rb +0 -27
- data/test/integration/user_login_test.rb +0 -53
- data/test/integration/user_login_with_remember_me_test.rb +0 -20
- data/test/integration/user_registration_test.rb +0 -64
- data/test/matchy/History.txt +0 -4
- data/test/matchy/License.txt +0 -20
- data/test/matchy/Manifest.txt +0 -22
- data/test/matchy/PostInstall.txt +0 -7
- data/test/matchy/README.rdoc +0 -68
- data/test/matchy/Rakefile +0 -4
- data/test/matchy/config/hoe.rb +0 -73
- data/test/matchy/config/requirements.rb +0 -15
- data/test/matchy/lib/matchy/built_in/enumerable_expectations.rb +0 -69
- data/test/matchy/lib/matchy/built_in/error_expectations.rb +0 -90
- data/test/matchy/lib/matchy/built_in/operator_expectations.rb +0 -97
- data/test/matchy/lib/matchy/built_in/truth_expectations.rb +0 -231
- data/test/matchy/lib/matchy/expectation.rb +0 -47
- data/test/matchy/lib/matchy/modals.rb +0 -51
- data/test/matchy/lib/matchy/version.rb +0 -9
- data/test/matchy/lib/matchy.rb +0 -16
- data/test/matchy/matchy.gemspec +0 -47
- data/test/matchy/setup.rb +0 -1585
- data/test/matchy/tasks/deployment.rake +0 -34
- data/test/matchy/tasks/environment.rake +0 -7
- data/test/matchy/test/test_enumerable_expectations.rb +0 -91
- data/test/matchy/test/test_error_expectations.rb +0 -109
- data/test/matchy/test/test_expectation_base.rb +0 -35
- data/test/matchy/test/test_helper.rb +0 -2
- data/test/matchy/test/test_modals.rb +0 -39
- data/test/matchy/test/test_operator_expectations.rb +0 -157
- data/test/matchy/test/test_truth_expectations.rb +0 -258
- data/test/no_peeping_toms/README +0 -40
- data/test/no_peeping_toms/init.rb +0 -12
- data/test/no_peeping_toms/install.rb +0 -1
- data/test/no_peeping_toms/lib/no_peeping_toms.rb +0 -10
- data/test/no_peeping_toms/spec/db/database.yml +0 -3
- data/test/no_peeping_toms/spec/db/schema.rb +0 -5
- data/test/no_peeping_toms/spec/no_peeping_toms_spec.rb +0 -56
- data/test/no_peeping_toms/spec/spec_helper.rb +0 -8
- data/test/no_peeping_toms/tasks/no_peeping_toms_tasks.rake +0 -4
- data/test/no_peeping_toms/uninstall.rb +0 -1
- data/test/plugins/adva_context_templates/context_templates_test.rb +0 -138
- data/test/plugins/adva_post_ping/controller/integration_test.rb +0 -78
- data/test/plugins/adva_post_ping/post_ping_test.rb +0 -94
- data/test/plugins/adva_url_history/article_test.rb +0 -94
- data/test/plugins/adva_url_history/section_test.rb +0 -49
- data/test/rr/.gitignore +0 -6
- data/test/rr/CHANGES +0 -192
- data/test/rr/README.rdoc +0 -309
- data/test/rr/Rakefile +0 -70
- data/test/rr/doc/0.6.0.release.markdown +0 -81
- data/test/rr/introducting_rr.txt +0 -206
- data/test/rr/lib/rr/adapters/rr_methods.rb +0 -131
- data/test/rr/lib/rr/adapters/rspec.rb +0 -23
- data/test/rr/lib/rr/adapters/test_unit.rb +0 -25
- data/test/rr/lib/rr/double.rb +0 -212
- data/test/rr/lib/rr/double_definitions/child_double_definition_creator.rb +0 -27
- data/test/rr/lib/rr/double_definitions/double_definition.rb +0 -346
- data/test/rr/lib/rr/double_definitions/double_definition_creator.rb +0 -167
- data/test/rr/lib/rr/double_definitions/double_definition_creator_proxy.rb +0 -57
- data/test/rr/lib/rr/double_definitions/strategies/implementation/implementation_strategy.rb +0 -15
- data/test/rr/lib/rr/double_definitions/strategies/implementation/proxy.rb +0 -62
- data/test/rr/lib/rr/double_definitions/strategies/implementation/reimplementation.rb +0 -14
- data/test/rr/lib/rr/double_definitions/strategies/implementation/strongly_typed_reimplementation.rb +0 -17
- data/test/rr/lib/rr/double_definitions/strategies/scope/instance.rb +0 -15
- data/test/rr/lib/rr/double_definitions/strategies/scope/instance_of_class.rb +0 -46
- data/test/rr/lib/rr/double_definitions/strategies/scope/scope_strategy.rb +0 -15
- data/test/rr/lib/rr/double_definitions/strategies/strategy.rb +0 -70
- data/test/rr/lib/rr/double_definitions/strategies/verification/dont_allow.rb +0 -34
- data/test/rr/lib/rr/double_definitions/strategies/verification/mock.rb +0 -44
- data/test/rr/lib/rr/double_definitions/strategies/verification/stub.rb +0 -45
- data/test/rr/lib/rr/double_definitions/strategies/verification/verification_strategy.rb +0 -15
- data/test/rr/lib/rr/double_injection.rb +0 -141
- data/test/rr/lib/rr/double_matches.rb +0 -51
- data/test/rr/lib/rr/errors/argument_equality_error.rb +0 -6
- data/test/rr/lib/rr/errors/double_definition_error.rb +0 -6
- data/test/rr/lib/rr/errors/double_not_found_error.rb +0 -6
- data/test/rr/lib/rr/errors/double_order_error.rb +0 -6
- data/test/rr/lib/rr/errors/rr_error.rb +0 -20
- data/test/rr/lib/rr/errors/spy_verification_error.rb +0 -6
- data/test/rr/lib/rr/errors/subject_does_not_implement_method_error.rb +0 -6
- data/test/rr/lib/rr/errors/subject_has_different_arity_error.rb +0 -6
- data/test/rr/lib/rr/errors/times_called_error.rb +0 -6
- data/test/rr/lib/rr/expectations/any_argument_expectation.rb +0 -21
- data/test/rr/lib/rr/expectations/argument_equality_expectation.rb +0 -41
- data/test/rr/lib/rr/expectations/times_called_expectation.rb +0 -57
- data/test/rr/lib/rr/hash_with_object_id_key.rb +0 -41
- data/test/rr/lib/rr/invocation_matcher.rb +0 -27
- data/test/rr/lib/rr/recorded_calls.rb +0 -72
- data/test/rr/lib/rr/space.rb +0 -123
- data/test/rr/lib/rr/spy_verification.rb +0 -38
- data/test/rr/lib/rr/spy_verification_proxy.rb +0 -18
- data/test/rr/lib/rr/times_called_matchers/any_times_matcher.rb +0 -19
- data/test/rr/lib/rr/times_called_matchers/at_least_matcher.rb +0 -16
- data/test/rr/lib/rr/times_called_matchers/at_most_matcher.rb +0 -24
- data/test/rr/lib/rr/times_called_matchers/integer_matcher.rb +0 -19
- data/test/rr/lib/rr/times_called_matchers/non_terminal.rb +0 -27
- data/test/rr/lib/rr/times_called_matchers/proc_matcher.rb +0 -11
- data/test/rr/lib/rr/times_called_matchers/range_matcher.rb +0 -21
- data/test/rr/lib/rr/times_called_matchers/terminal.rb +0 -20
- data/test/rr/lib/rr/times_called_matchers/times_called_matcher.rb +0 -44
- data/test/rr/lib/rr/wildcard_matchers/anything.rb +0 -18
- data/test/rr/lib/rr/wildcard_matchers/boolean.rb +0 -23
- data/test/rr/lib/rr/wildcard_matchers/duck_type.rb +0 -32
- data/test/rr/lib/rr/wildcard_matchers/hash_including.rb +0 -29
- data/test/rr/lib/rr/wildcard_matchers/is_a.rb +0 -25
- data/test/rr/lib/rr/wildcard_matchers/numeric.rb +0 -13
- data/test/rr/lib/rr/wildcard_matchers/range.rb +0 -7
- data/test/rr/lib/rr/wildcard_matchers/regexp.rb +0 -7
- data/test/rr/lib/rr/wildcard_matchers/satisfy.rb +0 -26
- data/test/rr/lib/rr.rb +0 -83
- data/test/rr/spec/core_spec_suite.rb +0 -19
- data/test/rr/spec/environment_fixture_setup.rb +0 -6
- data/test/rr/spec/high_level_spec.rb +0 -350
- data/test/rr/spec/recorded_calls_spec.rb +0 -119
- data/test/rr/spec/rr/adapters/rr_methods_argument_matcher_spec.rb +0 -67
- data/test/rr/spec/rr/adapters/rr_methods_creator_spec.rb +0 -149
- data/test/rr/spec/rr/adapters/rr_methods_space_spec.rb +0 -115
- data/test/rr/spec/rr/adapters/rr_methods_spec_helper.rb +0 -11
- data/test/rr/spec/rr/adapters/rr_methods_times_matcher_spec.rb +0 -17
- data/test/rr/spec/rr/double_definitions/child_double_definition_creator_spec.rb +0 -112
- data/test/rr/spec/rr/double_definitions/double_definition_creator_proxy_spec.rb +0 -155
- data/test/rr/spec/rr/double_definitions/double_definition_creator_spec.rb +0 -502
- data/test/rr/spec/rr/double_definitions/double_definition_spec.rb +0 -1159
- data/test/rr/spec/rr/double_injection/double_injection_bind_spec.rb +0 -111
- data/test/rr/spec/rr/double_injection/double_injection_dispatching_spec.rb +0 -244
- data/test/rr/spec/rr/double_injection/double_injection_has_original_method_spec.rb +0 -55
- data/test/rr/spec/rr/double_injection/double_injection_reset_spec.rb +0 -90
- data/test/rr/spec/rr/double_injection/double_injection_spec.rb +0 -77
- data/test/rr/spec/rr/double_injection/double_injection_verify_spec.rb +0 -29
- data/test/rr/spec/rr/double_spec.rb +0 -352
- data/test/rr/spec/rr/errors/rr_error_spec.rb +0 -67
- data/test/rr/spec/rr/expectations/any_argument_expectation_spec.rb +0 -47
- data/test/rr/spec/rr/expectations/anything_argument_equality_expectation_spec.rb +0 -14
- data/test/rr/spec/rr/expectations/argument_equality_expectation_spec.rb +0 -135
- data/test/rr/spec/rr/expectations/boolean_argument_equality_expectation_spec.rb +0 -34
- data/test/rr/spec/rr/expectations/hash_including_argument_equality_expectation_spec.rb +0 -82
- data/test/rr/spec/rr/expectations/hash_including_spec.rb +0 -17
- data/test/rr/spec/rr/expectations/satisfy_argument_equality_expectation_spec.rb +0 -59
- data/test/rr/spec/rr/expectations/satisfy_spec.rb +0 -14
- data/test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_any_times_spec.rb +0 -46
- data/test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_at_least_spec.rb +0 -69
- data/test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_at_most_spec.rb +0 -71
- data/test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb +0 -23
- data/test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_integer_spec.rb +0 -104
- data/test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_proc_spec.rb +0 -81
- data/test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_range_spec.rb +0 -83
- data/test/rr/spec/rr/expectations/times_called_expectation/times_called_expectation_spec.rb +0 -38
- data/test/rr/spec/rr/invocation_matcher_spec.rb +0 -255
- data/test/rr/spec/rr/rspec/rspec_adapter_spec.rb +0 -66
- data/test/rr/spec/rr/rspec/rspec_backtrace_tweaking_spec.rb +0 -54
- data/test/rr/spec/rr/rspec/rspec_usage_spec.rb +0 -86
- data/test/rr/spec/rr/space/hash_with_object_id_key_spec.rb +0 -88
- data/test/rr/spec/rr/space/space_spec.rb +0 -542
- data/test/rr/spec/rr/test_unit/test_helper.rb +0 -7
- data/test/rr/spec/rr/test_unit/test_unit_backtrace_test.rb +0 -35
- data/test/rr/spec/rr/test_unit/test_unit_integration_test.rb +0 -47
- data/test/rr/spec/rr/times_called_matchers/any_times_matcher_spec.rb +0 -47
- data/test/rr/spec/rr/times_called_matchers/at_least_matcher_spec.rb +0 -55
- data/test/rr/spec/rr/times_called_matchers/at_most_matcher_spec.rb +0 -70
- data/test/rr/spec/rr/times_called_matchers/integer_matcher_spec.rb +0 -70
- data/test/rr/spec/rr/times_called_matchers/proc_matcher_spec.rb +0 -55
- data/test/rr/spec/rr/times_called_matchers/range_matcher_spec.rb +0 -76
- data/test/rr/spec/rr/times_called_matchers/times_called_matcher_spec.rb +0 -118
- data/test/rr/spec/rr/wildcard_matchers/anything_spec.rb +0 -24
- data/test/rr/spec/rr/wildcard_matchers/boolean_spec.rb +0 -36
- data/test/rr/spec/rr/wildcard_matchers/duck_type_spec.rb +0 -52
- data/test/rr/spec/rr/wildcard_matchers/is_a_spec.rb +0 -32
- data/test/rr/spec/rr/wildcard_matchers/numeric_spec.rb +0 -32
- data/test/rr/spec/rr/wildcard_matchers/range_spec.rb +0 -35
- data/test/rr/spec/rr/wildcard_matchers/regexp_spec.rb +0 -43
- data/test/rr/spec/rr_spec.rb +0 -28
- data/test/rr/spec/rspec_spec_suite.rb +0 -16
- data/test/rr/spec/spec.opts +0 -14
- data/test/rr/spec/spec_helper.rb +0 -107
- data/test/rr/spec/spec_suite.rb +0 -27
- data/test/rr/spec/test_unit_spec_suite.rb +0 -21
- data/test/test_helper/clear_directories.rb +0 -16
- data/test/test_helper/ensure_single_site_mode.rb +0 -10
- data/test/test_helper/extensions/cacheable_flash.rb +0 -14
- data/test/test_helper/extensions/cronjob.rb +0 -11
- data/test/test_helper/extensions/even_test_log.rb +0 -21
- data/test/test_helper/extensions/integration_test.rb +0 -78
- data/test/test_helper/extensions/matchy.rb +0 -365
- data/test/test_helper/extensions/matchy_adva_cms.rb +0 -441
- data/test/test_helper/extensions/rails_patch.rb +0 -40
- data/test/test_helper/extensions/rr.rb +0 -7
- data/test/test_helper/extensions/test_unit.rb +0 -35
- data/test/test_helper/extensions/with_sugar.rb +0 -166
- data/test/test_helper/parse_options.rb +0 -18
- data/test/test_helper/setup_db_transaction.rb +0 -15
- data/test/test_helper/setup_webrat.rb +0 -9
- data/test/test_helper/test_server/init.rb +0 -15
- data/test/test_helper.rb +0 -75
- data/test/test_plugin/about.yml +0 -7
- data/test/test_plugin/init.rb +0 -5
- data/test/test_server/README.textile +0 -19
- data/test/test_server/bin/server +0 -14
- data/test/test_server/bin/spec +0 -11
- data/test/test_server/bin/test +0 -11
- data/test/test_server/lib/test_server/client.rb +0 -24
- data/test/test_server/lib/test_server/rails.rb +0 -59
- data/test/test_server/lib/test_server/runner/redgreen.rb +0 -72
- data/test/test_server/lib/test_server/runner/specs.rb +0 -20
- data/test/test_server/lib/test_server/runner/test_unit.rb +0 -35
- data/test/test_server/lib/test_server/server.rb +0 -112
- data/test/test_server/lib/test_server.rb +0 -5
- data/test/test_server/test/resources/test/foo_test.rb +0 -1
- data/test/test_server/test/server_test.rb +0 -27
- data/test/test_server/test/test_helper.rb +0 -7
- data/test/unit/activities_notifier_test.rb +0 -75
- data/test/unit/activity_observer_test.rb +0 -65
- data/test/unit/activity_test.rb +0 -84
- data/test/unit/cells/user_cell_test.rb +0 -13
- data/test/unit/helpers/admin/base_helper_test.rb +0 -139
- data/test/unit/helpers/base_helper_spec.rb +0 -54
- data/test/unit/helpers/base_helper_test.rb +0 -165
- data/test/unit/helpers/content_helper_test.rb +0 -127
- data/test/unit/helpers/resource_helper_test.rb +0 -180
- data/test/unit/helpers/users_helper_test.rb +0 -52
- data/test/unit/i18n_test.rb +0 -22
- data/test/unit/lib/cells_ext_spec.rb +0 -96
- data/test/unit/lib/extensible_forms_test.rb +0 -362
- data/test/unit/lib/menu_test.rb +0 -119
- data/test/unit/lib/rails_ext/content_for_assignments_test.rb +0 -75
- data/test/unit/lib/rails_ext/plugin_configuration_test.rb +0 -40
- data/test/unit/lib/rails_ext/sticky_changes_test.rb +0 -33
- data/test/unit/lib/registry_test.rb +0 -91
- data/test/unit/lib/routing_filter/routing_filter_categories_spec.rb +0 -63
- data/test/unit/lib/routing_filter/routing_filter_categories_test.rb +0 -159
- data/test/unit/lib/routing_filter/routing_filter_locale_spec.rb +0 -73
- data/test/unit/lib/routing_filter/routing_filter_root_blog_archive_spec.rb +0 -40
- data/test/unit/lib/routing_filter/routing_filter_root_section_articles_spec.rb +0 -48
- data/test/unit/lib/routing_filter/routing_filter_root_wikipages_spec.rb +0 -40
- data/test/unit/lib/routing_filter/routing_filter_sections_spec.rb +0 -143
- data/test/unit/lib/routing_filter/routing_filter_sections_test.rb +0 -32
- data/test/unit/lib/routing_filter/routing_filter_sets_test.rb +0 -86
- data/test/unit/models/account_test.rb +0 -21
- data/test/unit/models/anonymous_test.rb +0 -54
- data/test/unit/models/article_test.rb +0 -191
- data/test/unit/models/category_test.rb +0 -68
- data/test/unit/models/content_test.rb +0 -409
- data/test/unit/models/counter_test.rb +0 -43
- data/test/unit/models/event_test.rb +0 -41
- data/test/unit/models/nested_categories_test.rb +0 -34
- data/test/unit/models/page_test.rb +0 -63
- data/test/unit/models/password_mailer_test.rb +0 -26
- data/test/unit/models/section_test.rb +0 -315
- data/test/unit/models/site_test.rb +0 -199
- data/test/unit/models/user_mailer_test.rb +0 -16
- data/test/unit/models/user_test.rb +0 -173
- data/test/unit/observers/activities_article_observer_test.rb +0 -42
- data/test/webrat/.document +0 -4
- data/test/webrat/History.txt +0 -264
- data/test/webrat/MIT-LICENSE.txt +0 -19
- data/test/webrat/README.rdoc +0 -85
- data/test/webrat/Rakefile +0 -151
- data/test/webrat/install.rb +0 -1
- data/test/webrat/lib/webrat/core/configuration.rb +0 -89
- data/test/webrat/lib/webrat/core/elements/area.rb +0 -31
- data/test/webrat/lib/webrat/core/elements/element.rb +0 -33
- data/test/webrat/lib/webrat/core/elements/field.rb +0 -396
- data/test/webrat/lib/webrat/core/elements/form.rb +0 -103
- data/test/webrat/lib/webrat/core/elements/label.rb +0 -31
- data/test/webrat/lib/webrat/core/elements/link.rb +0 -90
- data/test/webrat/lib/webrat/core/elements/select_option.rb +0 -35
- data/test/webrat/lib/webrat/core/locators/area_locator.rb +0 -38
- data/test/webrat/lib/webrat/core/locators/button_locator.rb +0 -54
- data/test/webrat/lib/webrat/core/locators/field_by_id_locator.rb +0 -37
- data/test/webrat/lib/webrat/core/locators/field_labeled_locator.rb +0 -56
- data/test/webrat/lib/webrat/core/locators/field_locator.rb +0 -25
- data/test/webrat/lib/webrat/core/locators/field_named_locator.rb +0 -41
- data/test/webrat/lib/webrat/core/locators/form_locator.rb +0 -19
- data/test/webrat/lib/webrat/core/locators/label_locator.rb +0 -34
- data/test/webrat/lib/webrat/core/locators/link_locator.rb +0 -66
- data/test/webrat/lib/webrat/core/locators/locator.rb +0 -20
- data/test/webrat/lib/webrat/core/locators/select_option_locator.rb +0 -59
- data/test/webrat/lib/webrat/core/locators.rb +0 -20
- data/test/webrat/lib/webrat/core/logging.rb +0 -21
- data/test/webrat/lib/webrat/core/matchers/have_content.rb +0 -69
- data/test/webrat/lib/webrat/core/matchers/have_selector.rb +0 -52
- data/test/webrat/lib/webrat/core/matchers/have_tag.rb +0 -71
- data/test/webrat/lib/webrat/core/matchers/have_xpath.rb +0 -93
- data/test/webrat/lib/webrat/core/matchers.rb +0 -4
- data/test/webrat/lib/webrat/core/methods.rb +0 -61
- data/test/webrat/lib/webrat/core/mime.rb +0 -29
- data/test/webrat/lib/webrat/core/save_and_open_page.rb +0 -50
- data/test/webrat/lib/webrat/core/scope.rb +0 -350
- data/test/webrat/lib/webrat/core/session.rb +0 -259
- data/test/webrat/lib/webrat/core/xml/hpricot.rb +0 -19
- data/test/webrat/lib/webrat/core/xml/nokogiri.rb +0 -76
- data/test/webrat/lib/webrat/core/xml/rexml.rb +0 -24
- data/test/webrat/lib/webrat/core/xml.rb +0 -115
- data/test/webrat/lib/webrat/core.rb +0 -14
- data/test/webrat/lib/webrat/core_extensions/blank.rb +0 -58
- data/test/webrat/lib/webrat/core_extensions/deprecate.rb +0 -8
- data/test/webrat/lib/webrat/core_extensions/detect_mapped.rb +0 -12
- data/test/webrat/lib/webrat/core_extensions/hash_with_indifferent_access.rb +0 -131
- data/test/webrat/lib/webrat/core_extensions/meta_class.rb +0 -6
- data/test/webrat/lib/webrat/core_extensions/nil_to_param.rb +0 -5
- data/test/webrat/lib/webrat/mechanize.rb +0 -74
- data/test/webrat/lib/webrat/merb.rb +0 -9
- data/test/webrat/lib/webrat/merb_session.rb +0 -65
- data/test/webrat/lib/webrat/rack.rb +0 -24
- data/test/webrat/lib/webrat/rails.rb +0 -105
- data/test/webrat/lib/webrat/rspec-rails.rb +0 -13
- data/test/webrat/lib/webrat/selenium/location_strategy_javascript/button.js +0 -12
- data/test/webrat/lib/webrat/selenium/location_strategy_javascript/label.js +0 -16
- data/test/webrat/lib/webrat/selenium/location_strategy_javascript/webrat.js +0 -5
- data/test/webrat/lib/webrat/selenium/location_strategy_javascript/webratlink.js +0 -9
- data/test/webrat/lib/webrat/selenium/location_strategy_javascript/webratlinkwithin.js +0 -15
- data/test/webrat/lib/webrat/selenium/location_strategy_javascript/webratselectwithoption.js +0 -5
- data/test/webrat/lib/webrat/selenium/matchers/have_content.rb +0 -66
- data/test/webrat/lib/webrat/selenium/matchers/have_selector.rb +0 -49
- data/test/webrat/lib/webrat/selenium/matchers/have_tag.rb +0 -72
- data/test/webrat/lib/webrat/selenium/matchers/have_xpath.rb +0 -45
- data/test/webrat/lib/webrat/selenium/matchers.rb +0 -4
- data/test/webrat/lib/webrat/selenium/selenium_extensions.js +0 -6
- data/test/webrat/lib/webrat/selenium/selenium_session.rb +0 -237
- data/test/webrat/lib/webrat/selenium.rb +0 -99
- data/test/webrat/lib/webrat/sinatra.rb +0 -30
- data/test/webrat/lib/webrat.rb +0 -34
- data/test/webrat/spec/fakes/test_session.rb +0 -34
- data/test/webrat/spec/integration/merb/.gitignore +0 -21
- data/test/webrat/spec/integration/merb/Rakefile +0 -35
- data/test/webrat/spec/integration/merb/app/controllers/application.rb +0 -2
- data/test/webrat/spec/integration/merb/app/controllers/exceptions.rb +0 -13
- data/test/webrat/spec/integration/merb/app/controllers/testing.rb +0 -18
- data/test/webrat/spec/integration/merb/app/views/exceptions/not_acceptable.html.erb +0 -63
- data/test/webrat/spec/integration/merb/app/views/exceptions/not_found.html.erb +0 -47
- data/test/webrat/spec/integration/merb/app/views/layout/application.html.erb +0 -12
- data/test/webrat/spec/integration/merb/app/views/testing/show_form.html.erb +0 -27
- data/test/webrat/spec/integration/merb/config/environments/development.rb +0 -15
- data/test/webrat/spec/integration/merb/config/environments/rake.rb +0 -11
- data/test/webrat/spec/integration/merb/config/environments/test.rb +0 -14
- data/test/webrat/spec/integration/merb/config/init.rb +0 -25
- data/test/webrat/spec/integration/merb/config/rack.rb +0 -11
- data/test/webrat/spec/integration/merb/config/router.rb +0 -33
- data/test/webrat/spec/integration/merb/spec/spec.opts +0 -1
- data/test/webrat/spec/integration/merb/spec/spec_helper.rb +0 -24
- data/test/webrat/spec/integration/merb/spec/webrat_spec.rb +0 -32
- data/test/webrat/spec/integration/merb/tasks/merb.thor/app_script.rb +0 -31
- data/test/webrat/spec/integration/merb/tasks/merb.thor/common.rb +0 -64
- data/test/webrat/spec/integration/merb/tasks/merb.thor/gem_ext.rb +0 -124
- data/test/webrat/spec/integration/merb/tasks/merb.thor/main.thor +0 -150
- data/test/webrat/spec/integration/merb/tasks/merb.thor/ops.rb +0 -93
- data/test/webrat/spec/integration/merb/tasks/merb.thor/utils.rb +0 -40
- data/test/webrat/spec/integration/rails/.gitignore +0 -3
- data/test/webrat/spec/integration/rails/Rakefile +0 -30
- data/test/webrat/spec/integration/rails/app/controllers/application.rb +0 -15
- data/test/webrat/spec/integration/rails/app/controllers/webrat_controller.rb +0 -35
- data/test/webrat/spec/integration/rails/app/views/webrat/before_redirect_form.html.erb +0 -4
- data/test/webrat/spec/integration/rails/app/views/webrat/form.html.erb +0 -28
- data/test/webrat/spec/integration/rails/config/boot.rb +0 -109
- data/test/webrat/spec/integration/rails/config/environment.rb +0 -12
- data/test/webrat/spec/integration/rails/config/environments/development.rb +0 -17
- data/test/webrat/spec/integration/rails/config/environments/selenium.rb +0 -22
- data/test/webrat/spec/integration/rails/config/environments/test.rb +0 -22
- data/test/webrat/spec/integration/rails/config/initializers/inflections.rb +0 -10
- data/test/webrat/spec/integration/rails/config/initializers/mime_types.rb +0 -5
- data/test/webrat/spec/integration/rails/config/initializers/new_rails_defaults.rb +0 -17
- data/test/webrat/spec/integration/rails/config/locales/en.yml +0 -5
- data/test/webrat/spec/integration/rails/config/routes.rb +0 -13
- data/test/webrat/spec/integration/rails/public/404.html +0 -30
- data/test/webrat/spec/integration/rails/public/422.html +0 -30
- data/test/webrat/spec/integration/rails/public/500.html +0 -33
- data/test/webrat/spec/integration/rails/script/about +0 -4
- data/test/webrat/spec/integration/rails/script/console +0 -3
- data/test/webrat/spec/integration/rails/script/dbconsole +0 -3
- data/test/webrat/spec/integration/rails/script/destroy +0 -3
- data/test/webrat/spec/integration/rails/script/generate +0 -3
- data/test/webrat/spec/integration/rails/script/performance/benchmarker +0 -3
- data/test/webrat/spec/integration/rails/script/performance/profiler +0 -3
- data/test/webrat/spec/integration/rails/script/performance/request +0 -3
- data/test/webrat/spec/integration/rails/script/plugin +0 -3
- data/test/webrat/spec/integration/rails/script/process/inspector +0 -3
- data/test/webrat/spec/integration/rails/script/process/reaper +0 -3
- data/test/webrat/spec/integration/rails/script/process/spawner +0 -3
- data/test/webrat/spec/integration/rails/script/runner +0 -3
- data/test/webrat/spec/integration/rails/script/server +0 -3
- data/test/webrat/spec/integration/rails/test/integration/webrat_test.rb +0 -74
- data/test/webrat/spec/integration/rails/test/test_helper.rb +0 -25
- data/test/webrat/spec/integration/sinatra/Rakefile +0 -5
- data/test/webrat/spec/integration/sinatra/app.rb +0 -64
- data/test/webrat/spec/integration/sinatra/test/test_helper.rb +0 -17
- data/test/webrat/spec/integration/sinatra/test/webrat_test.rb +0 -36
- data/test/webrat/spec/private/core/configuration_spec.rb +0 -99
- data/test/webrat/spec/private/core/field_spec.rb +0 -67
- data/test/webrat/spec/private/core/link_spec.rb +0 -24
- data/test/webrat/spec/private/core/logging_spec.rb +0 -10
- data/test/webrat/spec/private/core/session_spec.rb +0 -207
- data/test/webrat/spec/private/mechanize/mechanize_session_spec.rb +0 -81
- data/test/webrat/spec/private/merb/indifferent_access_spec.rb +0 -47
- data/test/webrat/spec/private/merb/merb_session_spec.rb +0 -42
- data/test/webrat/spec/private/nokogiri_spec.rb +0 -77
- data/test/webrat/spec/private/rails/attaches_file_spec.rb +0 -81
- data/test/webrat/spec/private/rails/rails_session_spec.rb +0 -110
- data/test/webrat/spec/private/selenium/selenium_session_spec.rb +0 -44
- data/test/webrat/spec/private/selenium/selenium_spec.rb +0 -59
- data/test/webrat/spec/private/sinatra/helper.rb +0 -2
- data/test/webrat/spec/private/sinatra/sinatra_session_spec.rb +0 -28
- data/test/webrat/spec/public/basic_auth_spec.rb +0 -24
- data/test/webrat/spec/public/check_spec.rb +0 -154
- data/test/webrat/spec/public/choose_spec.rb +0 -118
- data/test/webrat/spec/public/click_area_spec.rb +0 -106
- data/test/webrat/spec/public/click_button_spec.rb +0 -502
- data/test/webrat/spec/public/click_link_spec.rb +0 -469
- data/test/webrat/spec/public/fill_in_spec.rb +0 -209
- data/test/webrat/spec/public/locators/field_by_xpath_spec.rb +0 -19
- data/test/webrat/spec/public/locators/field_labeled_spec.rb +0 -157
- data/test/webrat/spec/public/locators/field_with_id_spec.rb +0 -16
- data/test/webrat/spec/public/matchers_spec.rb +0 -321
- data/test/webrat/spec/public/reload_spec.rb +0 -10
- data/test/webrat/spec/public/save_and_open_spec.rb +0 -51
- data/test/webrat/spec/public/select_date_spec.rb +0 -88
- data/test/webrat/spec/public/select_datetime_spec.rb +0 -106
- data/test/webrat/spec/public/select_spec.rb +0 -246
- data/test/webrat/spec/public/select_time_spec.rb +0 -79
- data/test/webrat/spec/public/set_hidden_field_spec.rb +0 -5
- data/test/webrat/spec/public/submit_form_spec.rb +0 -5
- data/test/webrat/spec/public/visit_spec.rb +0 -67
- data/test/webrat/spec/public/within_spec.rb +0 -177
- data/test/webrat/spec/rcov.opts +0 -1
- data/test/webrat/spec/spec.opts +0 -2
- data/test/webrat/spec/spec_helper.rb +0 -50
- data/test/webrat/vendor/selenium-server.jar +0 -0
- data/test/with/README.textile +0 -136
- data/test/with/demo.rb +0 -158
- data/test/with/lib/with/call.rb +0 -40
- data/test/with/lib/with/context.rb +0 -95
- data/test/with/lib/with/implementation.rb +0 -18
- data/test/with/lib/with/node.rb +0 -65
- data/test/with/lib/with/sharing.rb +0 -29
- data/test/with/lib/with.rb +0 -81
- data/test/with/test/all.rb +0 -1
- data/test/with/test/context_calls_test.rb +0 -56
- data/test/with/test/context_compile_test.rb +0 -106
- data/test/with/test/context_structure_test.rb +0 -142
- data/test/with/test/demo_test.rb +0 -63
- data/test/with/test/helper.rb +0 -68
- data/test/with-sugar/lib/with-sugar/caching.rb +0 -41
- data/test/with-sugar/lib/with-sugar/controller.rb +0 -110
- data/test/with-sugar/lib/with-sugar/core.rb +0 -7
- data/test/with-sugar/lib/with-sugar/model.rb +0 -151
- data/test/with-sugar/lib/with-sugar/routing.rb +0 -30
- data/test/with-sugar/lib/with-sugar/view.rb +0 -65
- data/test/with-sugar/lib/with-sugar.rb +0 -6
- data/test/with-sugar/test/helper.rb +0 -19
- data/test/with-sugar/test/view_test.rb +0 -12
- data/vendor/gems/authentication/.gitignore +0 -17
- data/vendor/gems/authentication/Gemfile +0 -4
- data/vendor/gems/authentication/LICENSE +0 -22
- data/vendor/gems/authentication/MIT-LICENSE +0 -38
- data/vendor/gems/authentication/README +0 -39
- data/vendor/gems/authentication/README.md +0 -29
- data/vendor/gems/authentication/RUNNING_UNIT_TESTS +0 -13
- data/vendor/gems/authentication/Rakefile +0 -61
- data/vendor/gems/authentication/authentication.gemspec +0 -17
- data/vendor/gems/authentication/lib/authentication/active_record_extensions.rb +0 -11
- data/vendor/gems/authentication/lib/authentication/bogus.rb +0 -13
- data/vendor/gems/authentication/lib/authentication/hash_helper.rb +0 -26
- data/vendor/gems/authentication/lib/authentication/ldap.rb +0 -49
- data/vendor/gems/authentication/lib/authentication/remember_me.rb +0 -52
- data/vendor/gems/authentication/lib/authentication/salted_hash.rb +0 -53
- data/vendor/gems/authentication/lib/authentication/single_token.rb +0 -54
- data/vendor/gems/authentication/lib/authentication/version.rb +0 -3
- data/vendor/gems/authentication/lib/authentication.rb +0 -270
- data/vendor/gems/authentication/lib/radius/dictionary +0 -207
- data/vendor/gems/authentication/test_backup/abstract_unit.rb +0 -30
- data/vendor/gems/authentication/test_backup/active_record_extension_test.rb +0 -17
- data/vendor/gems/authentication/test_backup/authentication_test.rb +0 -231
- data/vendor/gems/authentication/test_backup/database.yml +0 -12
- data/vendor/gems/authentication/test_backup/fixtures/user.rb +0 -3
- data/vendor/gems/authentication/test_backup/fixtures/users.yml +0 -3
- data/vendor/gems/authentication/test_backup/options_test.rb +0 -100
- data/vendor/gems/authentication/test_backup/remember_me_test.rb +0 -41
- data/vendor/gems/authentication/test_backup/salted_hash_test.rb +0 -38
- data/vendor/gems/authentication/test_backup/schema.rb +0 -10
- data/vendor/gems/authentication/test_backup/single_token_test.rb +0 -44
- data/vendor/gems/authentication/test_backup/test_helper.rb +0 -8
- data/vendor/gems/filtered_column/.gitignore +0 -17
- data/vendor/gems/filtered_column/Gemfile +0 -4
- data/vendor/gems/filtered_column/LICENSE +0 -22
- data/vendor/gems/filtered_column/README +0 -4
- data/vendor/gems/filtered_column/README.md +0 -29
- data/vendor/gems/filtered_column/Rakefile +0 -23
- data/vendor/gems/filtered_column/filtered_column.gemspec +0 -17
- data/vendor/gems/filtered_column/lib/filtered_column/filters/base.rb +0 -28
- data/vendor/gems/filtered_column/lib/filtered_column/filters/smartypants_filter.rb +0 -14
- data/vendor/gems/filtered_column/lib/filtered_column/filters/textile_filter.rb +0 -13
- data/vendor/gems/filtered_column/lib/filtered_column/macros/base.rb +0 -25
- data/vendor/gems/filtered_column/lib/filtered_column/mixin.rb +0 -46
- data/vendor/gems/filtered_column/lib/filtered_column/processor.rb +0 -52
- data/vendor/gems/filtered_column/lib/filtered_column/version.rb +0 -3
- data/vendor/gems/filtered_column/lib/filtered_column.rb +0 -17
- data/vendor/gems/filtered_column/tasks/filtered_column_tasks.rake +0 -4
- data/vendor/gems/filtered_column/test/abstract_unit.rb +0 -74
- data/vendor/gems/filtered_column/test/filtered_column_test.rb +0 -53
- data/vendor/gems/filtered_column/test/macro_filter_test.rb +0 -23
- data/vendor/gems/simple_taggable/.gitignore +0 -17
- data/vendor/gems/simple_taggable/Gemfile +0 -7
- data/vendor/gems/simple_taggable/LICENSE +0 -22
- data/vendor/gems/simple_taggable/README +0 -24
- data/vendor/gems/simple_taggable/README.md +0 -29
- data/vendor/gems/simple_taggable/Rakefile +0 -2
- data/vendor/gems/simple_taggable/lib/simple_taggable/version.rb +0 -3
- data/vendor/gems/simple_taggable/lib/simple_taggable.rb +0 -163
- data/vendor/gems/simple_taggable/lib/tag.rb +0 -31
- data/vendor/gems/simple_taggable/lib/tag_list.rb +0 -104
- data/vendor/gems/simple_taggable/lib/tagging.rb +0 -8
- data/vendor/gems/simple_taggable/simple_taggable.gemspec +0 -19
- data/vendor/gems/simple_taggable/test/db/schema.rb +0 -41
- data/vendor/gems/simple_taggable/test/db/simple_taggable.sqlite3.db +0 -0
- data/vendor/gems/simple_taggable/test/fixtures/magazine.rb +0 -3
- data/vendor/gems/simple_taggable/test/fixtures/magazines.yml +0 -2
- data/vendor/gems/simple_taggable/test/fixtures/photo.rb +0 -8
- data/vendor/gems/simple_taggable/test/fixtures/photos.yml +0 -19
- data/vendor/gems/simple_taggable/test/fixtures/post.rb +0 -5
- data/vendor/gems/simple_taggable/test/fixtures/posts.yml +0 -27
- data/vendor/gems/simple_taggable/test/fixtures/subscription.rb +0 -4
- data/vendor/gems/simple_taggable/test/fixtures/subscriptions.yml +0 -3
- data/vendor/gems/simple_taggable/test/fixtures/taggings.yml +0 -112
- data/vendor/gems/simple_taggable/test/fixtures/tags.yml +0 -14
- data/vendor/gems/simple_taggable/test/fixtures/user.rb +0 -6
- data/vendor/gems/simple_taggable/test/fixtures/users.yml +0 -5
- data/vendor/gems/simple_taggable/test/log/simple_taggable.log +0 -1614
- data/vendor/gems/simple_taggable/test/simple_taggable_test.rb +0 -253
- data/vendor/gems/simple_taggable/test/tag_list_test.rb +0 -123
- data/vendor/gems/simple_taggable/test/test_helper.rb +0 -80
- data/vendor/gems/table_builder/test/table_builder/table_test.rb +0 -230
- data/vendor/gems/table_builder/test/test_helper.rb +0 -49
- data/vendor/gems/tags/test/tags/menu_test.rb +0 -173
- data/vendor/gems/tags/test/tags/tag_test.rb +0 -13
- data/vendor/gems/tags/test/test_helper.rb +0 -18
- /data/{test → spec}/fixtures/templates/alternative_templates/index.html.erb +0 -0
- /data/{test → spec}/fixtures/templates/context_templates_test/index.html.erb +0 -0
- /data/{test → spec}/fixtures/templates/context_templates_test/show.html.erb +0 -0
- /data/{test → spec}/fixtures/templates/layouts/alternative.html.erb +0 -0
- /data/{test → spec}/fixtures/templates/layouts/default.html.erb +0 -0
- /data/{test → spec}/javascript/assets/jquery-lowpro.js +0 -0
- /data/{test → spec}/javascript/assets/jquery-ui.js +0 -0
- /data/{test → spec}/javascript/assets/jquery.js +0 -0
- /data/{test → spec}/javascript/assets/testrunner.js +0 -0
- /data/{test → spec}/javascript/assets/testsuite.scss +0 -0
- /data/vendor/gems/table_builder/{test → spec/support}/fixtures/templates/table_auto_body.html.erb +0 -0
- /data/vendor/gems/table_builder/{test → spec/support}/fixtures/templates/table_auto_columns.html.erb +0 -0
|
@@ -1,1159 +0,0 @@
|
|
|
1
|
-
require File.expand_path("#{File.dirname(__FILE__)}/../../spec_helper")
|
|
2
|
-
|
|
3
|
-
module RR
|
|
4
|
-
module DoubleDefinitions
|
|
5
|
-
describe DoubleDefinition do
|
|
6
|
-
attr_reader :subject, :double_definition_creator, :double, :definition
|
|
7
|
-
|
|
8
|
-
it_should_behave_like "Swapped Space"
|
|
9
|
-
|
|
10
|
-
before do
|
|
11
|
-
@subject = Object.new
|
|
12
|
-
add_original_method
|
|
13
|
-
@double_definition_creator = DoubleDefinitionCreator.new
|
|
14
|
-
@definition = double_definition_creator.stub(subject).foobar
|
|
15
|
-
@double = definition.double
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def add_original_method
|
|
19
|
-
def subject.foobar(a, b)
|
|
20
|
-
:original_return_value
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
describe "#root_subject" do
|
|
25
|
-
it "returns #double_definition_creator.root_subject" do
|
|
26
|
-
definition.root_subject.should == definition.double_definition_creator.root_subject
|
|
27
|
-
definition.root_subject.should == subject
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
describe "DefinitionConstructionMethods" do
|
|
32
|
-
macro("DoubleDefinition where #double_definition_creator is a Reimplementation") do
|
|
33
|
-
before do
|
|
34
|
-
definition.double_definition_creator.implementation_strategy.class.should == Strategies::Implementation::Reimplementation
|
|
35
|
-
call_double_injection
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
macro("DoubleDefinition where #double_definition_creator is a Proxy") do
|
|
40
|
-
before do
|
|
41
|
-
definition.double_definition_creator.proxy
|
|
42
|
-
definition.double_definition_creator.implementation_strategy.class.should == Strategies::Implementation::Proxy
|
|
43
|
-
call_double_injection
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
describe "#with" do
|
|
48
|
-
macro("#with") do
|
|
49
|
-
it "returns DoubleDefinition" do
|
|
50
|
-
definition.with(1).should === definition
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
it "sets an ArgumentEqualityExpectation" do
|
|
54
|
-
definition.should be_exact_match(1, 2)
|
|
55
|
-
definition.should_not be_exact_match(2)
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
context "when not passed a block" do
|
|
60
|
-
before do
|
|
61
|
-
definition.with(1, 2)
|
|
62
|
-
subject.foobar(1, 2)
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
send "#with"
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
context "when passed a block" do
|
|
69
|
-
def call_double_injection
|
|
70
|
-
actual_args = nil
|
|
71
|
-
definition.with(1, 2) do |*args|
|
|
72
|
-
actual_args = args
|
|
73
|
-
:new_return_value
|
|
74
|
-
end
|
|
75
|
-
subject.foobar(1, 2)
|
|
76
|
-
@return_value = subject.foobar(1, 2)
|
|
77
|
-
@args = actual_args
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
context "when #double_definition_creator.implementation_strategy is a Reimplementation" do
|
|
81
|
-
send "DoubleDefinition where #double_definition_creator is a Reimplementation"
|
|
82
|
-
send "#with"
|
|
83
|
-
|
|
84
|
-
describe "#subject.method_name being called" do
|
|
85
|
-
it "returns the return value of the block" do
|
|
86
|
-
@return_value.should == :new_return_value
|
|
87
|
-
@args.should == [1, 2]
|
|
88
|
-
end
|
|
89
|
-
end
|
|
90
|
-
end
|
|
91
|
-
|
|
92
|
-
context "when #double_definition_creator.implementation_strategy is a Proxy" do
|
|
93
|
-
send "DoubleDefinition where #double_definition_creator is a Proxy"
|
|
94
|
-
send "#with"
|
|
95
|
-
|
|
96
|
-
describe "#subject.method_name being called" do
|
|
97
|
-
it "returns the return value of the block" do
|
|
98
|
-
@return_value.should == :new_return_value
|
|
99
|
-
@args.should == [:original_return_value]
|
|
100
|
-
end
|
|
101
|
-
end
|
|
102
|
-
end
|
|
103
|
-
end
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
describe "#with_any_args" do
|
|
107
|
-
macro "#with_any_args" do
|
|
108
|
-
it "returns DoubleDefinition" do
|
|
109
|
-
definition.with_no_args.should === definition
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
it "sets an AnyArgumentExpectation" do
|
|
113
|
-
definition.should_not be_exact_match(1)
|
|
114
|
-
definition.should be_wildcard_match(1)
|
|
115
|
-
end
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
context "when not passed a block" do
|
|
119
|
-
before do
|
|
120
|
-
definition.with_any_args
|
|
121
|
-
end
|
|
122
|
-
|
|
123
|
-
send "#with_any_args"
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
context "when passed a block" do
|
|
127
|
-
def call_double_injection
|
|
128
|
-
actual_args = nil
|
|
129
|
-
definition.with_any_args do |*args|
|
|
130
|
-
actual_args = args
|
|
131
|
-
:new_return_value
|
|
132
|
-
end
|
|
133
|
-
@return_value = subject.foobar(1, 2)
|
|
134
|
-
@args = actual_args
|
|
135
|
-
end
|
|
136
|
-
|
|
137
|
-
context "when #double_definition_creator.implementation_strategy is a Reimplementation" do
|
|
138
|
-
send "DoubleDefinition where #double_definition_creator is a Reimplementation"
|
|
139
|
-
send "#with_any_args"
|
|
140
|
-
|
|
141
|
-
describe "#subject.method_name being called" do
|
|
142
|
-
it "returns the return value of the block" do
|
|
143
|
-
@return_value.should == :new_return_value
|
|
144
|
-
@args.should == [1, 2]
|
|
145
|
-
end
|
|
146
|
-
end
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
context "when #double_definition_creator.implementation_strategy is a Proxy" do
|
|
150
|
-
send "DoubleDefinition where #double_definition_creator is a Proxy"
|
|
151
|
-
send "#with_any_args"
|
|
152
|
-
|
|
153
|
-
describe "#subject.method_name being called" do
|
|
154
|
-
it "returns the return value of the block" do
|
|
155
|
-
@return_value.should == :new_return_value
|
|
156
|
-
@args.should == [:original_return_value]
|
|
157
|
-
end
|
|
158
|
-
end
|
|
159
|
-
end
|
|
160
|
-
end
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
describe "#with_no_args" do
|
|
164
|
-
macro "#with_no_args" do
|
|
165
|
-
it "returns DoubleDefinition" do
|
|
166
|
-
definition.with_no_args.should === definition
|
|
167
|
-
end
|
|
168
|
-
|
|
169
|
-
it "sets an ArgumentEqualityExpectation with no arguments" do
|
|
170
|
-
definition.argument_expectation.should == Expectations::ArgumentEqualityExpectation.new()
|
|
171
|
-
end
|
|
172
|
-
end
|
|
173
|
-
|
|
174
|
-
def add_original_method
|
|
175
|
-
def subject.foobar()
|
|
176
|
-
:original_return_value
|
|
177
|
-
end
|
|
178
|
-
end
|
|
179
|
-
|
|
180
|
-
context "when not passed a block" do
|
|
181
|
-
before do
|
|
182
|
-
definition.with_no_args
|
|
183
|
-
end
|
|
184
|
-
|
|
185
|
-
send "#with_no_args"
|
|
186
|
-
end
|
|
187
|
-
|
|
188
|
-
context "when passed a block" do
|
|
189
|
-
def call_double_injection
|
|
190
|
-
actual_args = nil
|
|
191
|
-
definition.with_no_args do |*args|
|
|
192
|
-
actual_args = args
|
|
193
|
-
:new_return_value
|
|
194
|
-
end
|
|
195
|
-
@return_value = subject.foobar
|
|
196
|
-
@args = actual_args
|
|
197
|
-
end
|
|
198
|
-
|
|
199
|
-
context "when #double_definition_creator.implementation_strategy is a Reimplementation" do
|
|
200
|
-
send "DoubleDefinition where #double_definition_creator is a Reimplementation"
|
|
201
|
-
send "#with_no_args"
|
|
202
|
-
|
|
203
|
-
describe "#subject.method_name being called" do
|
|
204
|
-
it "returns the return value of the block" do
|
|
205
|
-
@return_value.should == :new_return_value
|
|
206
|
-
@args.should == []
|
|
207
|
-
end
|
|
208
|
-
end
|
|
209
|
-
end
|
|
210
|
-
|
|
211
|
-
context "when #double_definition_creator.implementation_strategy is a Proxy" do
|
|
212
|
-
send "DoubleDefinition where #double_definition_creator is a Proxy"
|
|
213
|
-
send "#with_no_args"
|
|
214
|
-
|
|
215
|
-
describe "#subject.method_name being called" do
|
|
216
|
-
it "returns the return value of the block" do
|
|
217
|
-
@return_value.should == :new_return_value
|
|
218
|
-
@args.should == [:original_return_value]
|
|
219
|
-
end
|
|
220
|
-
end
|
|
221
|
-
end
|
|
222
|
-
end
|
|
223
|
-
end
|
|
224
|
-
|
|
225
|
-
describe "#never" do
|
|
226
|
-
it "returns DoubleDefinition" do
|
|
227
|
-
definition.never.should === definition
|
|
228
|
-
end
|
|
229
|
-
|
|
230
|
-
it "sets up a Times Called Expectation with 0" do
|
|
231
|
-
definition.with_any_args
|
|
232
|
-
definition.never
|
|
233
|
-
lambda {subject.foobar}.should raise_error(Errors::TimesCalledError)
|
|
234
|
-
end
|
|
235
|
-
|
|
236
|
-
describe "#subject.method_name being called" do
|
|
237
|
-
it "raises a TimesCalledError" do
|
|
238
|
-
definition.with_any_args.never
|
|
239
|
-
lambda {subject.foobar}.should raise_error(Errors::TimesCalledError)
|
|
240
|
-
end
|
|
241
|
-
end
|
|
242
|
-
end
|
|
243
|
-
|
|
244
|
-
describe "#once" do
|
|
245
|
-
macro "#once" do
|
|
246
|
-
it "returns DoubleDefinition" do
|
|
247
|
-
definition.once.should === definition
|
|
248
|
-
end
|
|
249
|
-
|
|
250
|
-
it "sets up a Times Called Expectation with 1" do
|
|
251
|
-
lambda {subject.foobar}.should raise_error(Errors::TimesCalledError)
|
|
252
|
-
end
|
|
253
|
-
end
|
|
254
|
-
|
|
255
|
-
context "when not passed a block" do
|
|
256
|
-
before do
|
|
257
|
-
definition.with_any_args.once
|
|
258
|
-
subject.foobar(1, 2)
|
|
259
|
-
end
|
|
260
|
-
|
|
261
|
-
send "#once"
|
|
262
|
-
end
|
|
263
|
-
|
|
264
|
-
context "when passed a block" do
|
|
265
|
-
def call_double_injection
|
|
266
|
-
actual_args = nil
|
|
267
|
-
definition.with_any_args.once do |*args|
|
|
268
|
-
actual_args = args
|
|
269
|
-
:new_return_value
|
|
270
|
-
end
|
|
271
|
-
@return_value = subject.foobar(1, 2)
|
|
272
|
-
@args = actual_args
|
|
273
|
-
end
|
|
274
|
-
|
|
275
|
-
context "with returns block_callback_strategy" do
|
|
276
|
-
send "DoubleDefinition where #double_definition_creator is a Reimplementation"
|
|
277
|
-
send "#once"
|
|
278
|
-
|
|
279
|
-
describe "#subject.method_name being called with any arguments" do
|
|
280
|
-
it "returns the return value of the block" do
|
|
281
|
-
@return_value.should == :new_return_value
|
|
282
|
-
@args.should == [1, 2]
|
|
283
|
-
end
|
|
284
|
-
end
|
|
285
|
-
end
|
|
286
|
-
|
|
287
|
-
context "with after_call block_callback_strategy" do
|
|
288
|
-
send "DoubleDefinition where #double_definition_creator is a Proxy"
|
|
289
|
-
send "#once"
|
|
290
|
-
|
|
291
|
-
describe "#subject.method_name being called with any arguments" do
|
|
292
|
-
it "returns the return value of the block" do
|
|
293
|
-
@return_value.should == :new_return_value
|
|
294
|
-
@args.should == [:original_return_value]
|
|
295
|
-
end
|
|
296
|
-
end
|
|
297
|
-
end
|
|
298
|
-
end
|
|
299
|
-
end
|
|
300
|
-
|
|
301
|
-
describe "#twice" do
|
|
302
|
-
macro "#twice" do
|
|
303
|
-
it "returns DoubleDefinition" do
|
|
304
|
-
definition.twice.should === definition
|
|
305
|
-
end
|
|
306
|
-
|
|
307
|
-
it "sets up a Times Called Expectation with 2" do
|
|
308
|
-
definition.twice.with_any_args
|
|
309
|
-
lambda {subject.foobar(1, 2)}.should raise_error(Errors::TimesCalledError)
|
|
310
|
-
end
|
|
311
|
-
end
|
|
312
|
-
|
|
313
|
-
context "when not passed a block" do
|
|
314
|
-
before do
|
|
315
|
-
definition.with_any_args.twice
|
|
316
|
-
subject.foobar(1, 2)
|
|
317
|
-
subject.foobar(1, 2)
|
|
318
|
-
end
|
|
319
|
-
|
|
320
|
-
send "#twice"
|
|
321
|
-
end
|
|
322
|
-
|
|
323
|
-
context "when passed a block" do
|
|
324
|
-
def call_double_injection
|
|
325
|
-
actual_args = nil
|
|
326
|
-
definition.with_any_args.twice do |*args|
|
|
327
|
-
actual_args = args
|
|
328
|
-
:new_return_value
|
|
329
|
-
end
|
|
330
|
-
subject.foobar(1, 2)
|
|
331
|
-
@return_value = subject.foobar(1, 2)
|
|
332
|
-
@args = actual_args
|
|
333
|
-
end
|
|
334
|
-
|
|
335
|
-
context "with returns block_callback_strategy" do
|
|
336
|
-
send "DoubleDefinition where #double_definition_creator is a Reimplementation"
|
|
337
|
-
send "#twice"
|
|
338
|
-
|
|
339
|
-
describe "#subject.method_name being called" do
|
|
340
|
-
it "returns the return value of the block" do
|
|
341
|
-
@return_value.should == :new_return_value
|
|
342
|
-
@args.should == [1, 2]
|
|
343
|
-
end
|
|
344
|
-
end
|
|
345
|
-
end
|
|
346
|
-
|
|
347
|
-
context "with after_call block_callback_strategy" do
|
|
348
|
-
send "DoubleDefinition where #double_definition_creator is a Proxy"
|
|
349
|
-
send "#twice"
|
|
350
|
-
|
|
351
|
-
describe "#subject.method_name being called" do
|
|
352
|
-
it "returns the return value of the block" do
|
|
353
|
-
@return_value.should == :new_return_value
|
|
354
|
-
@args.should == [:original_return_value]
|
|
355
|
-
end
|
|
356
|
-
end
|
|
357
|
-
end
|
|
358
|
-
end
|
|
359
|
-
end
|
|
360
|
-
|
|
361
|
-
describe "#at_least" do
|
|
362
|
-
macro "#at_least" do
|
|
363
|
-
it "returns DoubleDefinition" do
|
|
364
|
-
definition.with_any_args.at_least(2).should === definition
|
|
365
|
-
end
|
|
366
|
-
|
|
367
|
-
it "sets up a Times Called Expectation with 1" do
|
|
368
|
-
definition.times_matcher.should == TimesCalledMatchers::AtLeastMatcher.new(2)
|
|
369
|
-
end
|
|
370
|
-
end
|
|
371
|
-
|
|
372
|
-
context "when not passed a block" do
|
|
373
|
-
before do
|
|
374
|
-
definition.with_any_args.at_least(2)
|
|
375
|
-
subject.foobar(1, 2)
|
|
376
|
-
end
|
|
377
|
-
|
|
378
|
-
send "#at_least"
|
|
379
|
-
end
|
|
380
|
-
|
|
381
|
-
context "when passed a block" do
|
|
382
|
-
def call_double_injection
|
|
383
|
-
actual_args = nil
|
|
384
|
-
definition.with_any_args.at_least(2) do |*args|
|
|
385
|
-
actual_args = args
|
|
386
|
-
:new_return_value
|
|
387
|
-
end
|
|
388
|
-
subject.foobar(1, 2)
|
|
389
|
-
@return_value = subject.foobar(1, 2)
|
|
390
|
-
@args = actual_args
|
|
391
|
-
end
|
|
392
|
-
|
|
393
|
-
context "with returns block_callback_strategy" do
|
|
394
|
-
send "DoubleDefinition where #double_definition_creator is a Reimplementation"
|
|
395
|
-
send "#at_least"
|
|
396
|
-
|
|
397
|
-
describe "#subject.method_name being called" do
|
|
398
|
-
it "returns the return value of the block" do
|
|
399
|
-
@return_value.should == :new_return_value
|
|
400
|
-
@args.should == [1, 2]
|
|
401
|
-
end
|
|
402
|
-
end
|
|
403
|
-
end
|
|
404
|
-
|
|
405
|
-
context "with after_call block_callback_strategy" do
|
|
406
|
-
send "DoubleDefinition where #double_definition_creator is a Proxy"
|
|
407
|
-
send "#at_least"
|
|
408
|
-
|
|
409
|
-
describe "#subject.method_name being called" do
|
|
410
|
-
it "returns the return value of the block" do
|
|
411
|
-
@return_value.should == :new_return_value
|
|
412
|
-
@args.should == [:original_return_value]
|
|
413
|
-
end
|
|
414
|
-
end
|
|
415
|
-
end
|
|
416
|
-
end
|
|
417
|
-
end
|
|
418
|
-
|
|
419
|
-
describe "#at_most" do
|
|
420
|
-
macro "#at_most" do
|
|
421
|
-
it "returns DoubleDefinition" do
|
|
422
|
-
definition.with_any_args.at_most(2).should === definition
|
|
423
|
-
end
|
|
424
|
-
|
|
425
|
-
it "sets up a Times Called Expectation with 1" do
|
|
426
|
-
lambda do
|
|
427
|
-
subject.foobar
|
|
428
|
-
end.should raise_error(Errors::TimesCalledError, "foobar()\nCalled 3 times.\nExpected at most 2 times.")
|
|
429
|
-
end
|
|
430
|
-
end
|
|
431
|
-
|
|
432
|
-
context "when not passed a block" do
|
|
433
|
-
before do
|
|
434
|
-
definition.with_any_args.at_most(2)
|
|
435
|
-
subject.foobar(1, 2)
|
|
436
|
-
subject.foobar(1, 2)
|
|
437
|
-
end
|
|
438
|
-
|
|
439
|
-
send "#at_most"
|
|
440
|
-
end
|
|
441
|
-
|
|
442
|
-
context "when passed a block" do
|
|
443
|
-
def call_double_injection
|
|
444
|
-
actual_args = nil
|
|
445
|
-
definition.with_any_args.at_most(2) do |*args|
|
|
446
|
-
actual_args = args
|
|
447
|
-
:new_return_value
|
|
448
|
-
end
|
|
449
|
-
subject.foobar(1, 2)
|
|
450
|
-
@return_value = subject.foobar(1, 2)
|
|
451
|
-
@args = actual_args
|
|
452
|
-
end
|
|
453
|
-
|
|
454
|
-
context "with returns block_callback_strategy" do
|
|
455
|
-
send "DoubleDefinition where #double_definition_creator is a Reimplementation"
|
|
456
|
-
send "#at_most"
|
|
457
|
-
|
|
458
|
-
describe "#subject.method_name being called" do
|
|
459
|
-
it "returns the return value of the block" do
|
|
460
|
-
@return_value.should == :new_return_value
|
|
461
|
-
@args.should == [1, 2]
|
|
462
|
-
end
|
|
463
|
-
end
|
|
464
|
-
end
|
|
465
|
-
|
|
466
|
-
context "with after_call block_callback_strategy" do
|
|
467
|
-
send "DoubleDefinition where #double_definition_creator is a Proxy"
|
|
468
|
-
send "#at_most"
|
|
469
|
-
|
|
470
|
-
describe "#subject.method_name being called" do
|
|
471
|
-
it "returns the return value of the block" do
|
|
472
|
-
@return_value.should == :new_return_value
|
|
473
|
-
@args.should == [:original_return_value]
|
|
474
|
-
end
|
|
475
|
-
end
|
|
476
|
-
end
|
|
477
|
-
end
|
|
478
|
-
end
|
|
479
|
-
|
|
480
|
-
describe "#times" do
|
|
481
|
-
macro "#times" do
|
|
482
|
-
it "returns DoubleDefinition" do
|
|
483
|
-
definition.times(3).should === definition
|
|
484
|
-
end
|
|
485
|
-
|
|
486
|
-
it "sets up a Times Called Expectation with passed in times" do
|
|
487
|
-
lambda {subject.foobar(1, 2)}.should raise_error(Errors::TimesCalledError)
|
|
488
|
-
end
|
|
489
|
-
end
|
|
490
|
-
|
|
491
|
-
context "when not passed a block" do
|
|
492
|
-
before do
|
|
493
|
-
definition.with(1, 2).times(3)
|
|
494
|
-
subject.foobar(1, 2)
|
|
495
|
-
subject.foobar(1, 2)
|
|
496
|
-
subject.foobar(1, 2)
|
|
497
|
-
end
|
|
498
|
-
|
|
499
|
-
send "#times"
|
|
500
|
-
end
|
|
501
|
-
|
|
502
|
-
context "when passed a block" do
|
|
503
|
-
def call_double_injection
|
|
504
|
-
actual_args = nil
|
|
505
|
-
definition.with(1, 2).times(3) do |*args|
|
|
506
|
-
actual_args = args
|
|
507
|
-
:new_return_value
|
|
508
|
-
end
|
|
509
|
-
subject.foobar(1, 2)
|
|
510
|
-
subject.foobar(1, 2)
|
|
511
|
-
@return_value = subject.foobar(1, 2)
|
|
512
|
-
@args = actual_args
|
|
513
|
-
end
|
|
514
|
-
|
|
515
|
-
context "with returns block_callback_strategy" do
|
|
516
|
-
send "DoubleDefinition where #double_definition_creator is a Reimplementation"
|
|
517
|
-
send "#times"
|
|
518
|
-
|
|
519
|
-
describe "#subject.method_name being called" do
|
|
520
|
-
it "returns the return value of the block" do
|
|
521
|
-
@return_value.should == :new_return_value
|
|
522
|
-
@args.should == [1, 2]
|
|
523
|
-
end
|
|
524
|
-
end
|
|
525
|
-
end
|
|
526
|
-
|
|
527
|
-
context "with after_call block_callback_strategy" do
|
|
528
|
-
send "DoubleDefinition where #double_definition_creator is a Proxy"
|
|
529
|
-
send "#times"
|
|
530
|
-
|
|
531
|
-
describe "#subject.method_name being called" do
|
|
532
|
-
it "returns the return value of the block" do
|
|
533
|
-
@return_value.should == :new_return_value
|
|
534
|
-
@args.should == [:original_return_value]
|
|
535
|
-
end
|
|
536
|
-
end
|
|
537
|
-
end
|
|
538
|
-
end
|
|
539
|
-
end
|
|
540
|
-
|
|
541
|
-
describe "#any_number_of_times" do
|
|
542
|
-
macro "#any_number_of_times" do
|
|
543
|
-
it "returns DoubleDefinition" do
|
|
544
|
-
definition.any_number_of_times.should === definition
|
|
545
|
-
end
|
|
546
|
-
|
|
547
|
-
it "sets up a Times Called Expectation with AnyTimes matcher" do
|
|
548
|
-
definition.times_matcher.should == TimesCalledMatchers::AnyTimesMatcher.new
|
|
549
|
-
end
|
|
550
|
-
end
|
|
551
|
-
|
|
552
|
-
context "when not passed a block" do
|
|
553
|
-
before do
|
|
554
|
-
definition.with(1, 2).any_number_of_times
|
|
555
|
-
subject.foobar(1, 2)
|
|
556
|
-
end
|
|
557
|
-
|
|
558
|
-
send "#any_number_of_times"
|
|
559
|
-
end
|
|
560
|
-
|
|
561
|
-
context "when passed a block" do
|
|
562
|
-
def call_double_injection
|
|
563
|
-
actual_args = nil
|
|
564
|
-
definition.with(1, 2).any_number_of_times do |*args|
|
|
565
|
-
actual_args = args
|
|
566
|
-
:new_return_value
|
|
567
|
-
end
|
|
568
|
-
subject.foobar(1, 2)
|
|
569
|
-
@return_value = subject.foobar(1, 2)
|
|
570
|
-
@args = actual_args
|
|
571
|
-
end
|
|
572
|
-
|
|
573
|
-
context "with returns block_callback_strategy" do
|
|
574
|
-
send "DoubleDefinition where #double_definition_creator is a Reimplementation"
|
|
575
|
-
send "#any_number_of_times"
|
|
576
|
-
|
|
577
|
-
describe "#subject.method_name being called" do
|
|
578
|
-
it "returns the return value of the block" do
|
|
579
|
-
@return_value.should == :new_return_value
|
|
580
|
-
@args.should == [1, 2]
|
|
581
|
-
end
|
|
582
|
-
end
|
|
583
|
-
end
|
|
584
|
-
|
|
585
|
-
context "with after_call block_callback_strategy" do
|
|
586
|
-
send "DoubleDefinition where #double_definition_creator is a Proxy"
|
|
587
|
-
send "#any_number_of_times"
|
|
588
|
-
|
|
589
|
-
describe "#subject.method_name being called" do
|
|
590
|
-
it "returns the return value of the block" do
|
|
591
|
-
@return_value.should == :new_return_value
|
|
592
|
-
@args.should == [:original_return_value]
|
|
593
|
-
end
|
|
594
|
-
end
|
|
595
|
-
end
|
|
596
|
-
end
|
|
597
|
-
end
|
|
598
|
-
|
|
599
|
-
describe "#ordered" do
|
|
600
|
-
macro "#ordered" do
|
|
601
|
-
it "adds itself to the ordered doubles list" do
|
|
602
|
-
definition.ordered
|
|
603
|
-
Space.instance.ordered_doubles.should include(double)
|
|
604
|
-
end
|
|
605
|
-
|
|
606
|
-
it "does not double_injection add itself" do
|
|
607
|
-
definition.ordered
|
|
608
|
-
Space.instance.ordered_doubles.should == [double]
|
|
609
|
-
end
|
|
610
|
-
|
|
611
|
-
it "sets ordered? to true" do
|
|
612
|
-
definition.should be_ordered
|
|
613
|
-
end
|
|
614
|
-
|
|
615
|
-
context "when there is no Double" do
|
|
616
|
-
it "raises a DoubleDefinitionError" do
|
|
617
|
-
definition.double = nil
|
|
618
|
-
lambda do
|
|
619
|
-
definition.ordered
|
|
620
|
-
end.should raise_error(
|
|
621
|
-
Errors::DoubleDefinitionError,
|
|
622
|
-
"Double Definitions must have a dedicated Double to be ordered. " <<
|
|
623
|
-
"For example, using instance_of does not allow ordered to be used. " <<
|
|
624
|
-
"proxy the class's #new method instead."
|
|
625
|
-
)
|
|
626
|
-
end
|
|
627
|
-
end
|
|
628
|
-
end
|
|
629
|
-
|
|
630
|
-
context "when not passed a block" do
|
|
631
|
-
before do
|
|
632
|
-
definition.with(1, 2).once.ordered
|
|
633
|
-
subject.foobar(1, 2)
|
|
634
|
-
end
|
|
635
|
-
|
|
636
|
-
send "#ordered"
|
|
637
|
-
end
|
|
638
|
-
|
|
639
|
-
context "when passed a block" do
|
|
640
|
-
def call_double_injection
|
|
641
|
-
actual_args = nil
|
|
642
|
-
definition.with(1, 2).once.ordered do |*args|
|
|
643
|
-
actual_args = args
|
|
644
|
-
:new_return_value
|
|
645
|
-
end
|
|
646
|
-
@return_value = subject.foobar(1, 2)
|
|
647
|
-
@args = actual_args
|
|
648
|
-
end
|
|
649
|
-
|
|
650
|
-
context "with returns block_callback_strategy" do
|
|
651
|
-
send "DoubleDefinition where #double_definition_creator is a Reimplementation"
|
|
652
|
-
send "#ordered"
|
|
653
|
-
|
|
654
|
-
describe "#subject.method_name being called" do
|
|
655
|
-
it "returns the return value of the block" do
|
|
656
|
-
@return_value.should == :new_return_value
|
|
657
|
-
@args.should == [1, 2]
|
|
658
|
-
end
|
|
659
|
-
end
|
|
660
|
-
end
|
|
661
|
-
|
|
662
|
-
context "with after_call block_callback_strategy" do
|
|
663
|
-
send "DoubleDefinition where #double_definition_creator is a Proxy"
|
|
664
|
-
send "#ordered"
|
|
665
|
-
|
|
666
|
-
describe "#subject.method_name being called" do
|
|
667
|
-
it "returns the return value of the block" do
|
|
668
|
-
@return_value.should == :new_return_value
|
|
669
|
-
@args.should == [:original_return_value]
|
|
670
|
-
end
|
|
671
|
-
end
|
|
672
|
-
end
|
|
673
|
-
end
|
|
674
|
-
end
|
|
675
|
-
|
|
676
|
-
describe "#yields" do
|
|
677
|
-
macro "#yields" do
|
|
678
|
-
it "returns DoubleDefinition" do
|
|
679
|
-
definition.yields(:baz).should === definition
|
|
680
|
-
end
|
|
681
|
-
|
|
682
|
-
context "when there is a no returns value set" do
|
|
683
|
-
it "yields the passed in argument to the call block" do
|
|
684
|
-
@passed_in_block_arg.should == :baz
|
|
685
|
-
end
|
|
686
|
-
end
|
|
687
|
-
end
|
|
688
|
-
|
|
689
|
-
context "when not passed a block" do
|
|
690
|
-
before do
|
|
691
|
-
definition.with(1, 2).once.yields(:baz)
|
|
692
|
-
passed_in_block_arg = nil
|
|
693
|
-
subject.foobar(1, 2) do |arg|
|
|
694
|
-
passed_in_block_arg = arg
|
|
695
|
-
end
|
|
696
|
-
@passed_in_block_arg = passed_in_block_arg
|
|
697
|
-
end
|
|
698
|
-
|
|
699
|
-
send "#yields"
|
|
700
|
-
end
|
|
701
|
-
|
|
702
|
-
context "when passed a block" do
|
|
703
|
-
def call_double_injection
|
|
704
|
-
actual_args = nil
|
|
705
|
-
definition.with(1, 2).once.yields(:baz) do |*args|
|
|
706
|
-
actual_args = args
|
|
707
|
-
:new_return_value
|
|
708
|
-
end
|
|
709
|
-
passed_in_block_arg = nil
|
|
710
|
-
@return_value = subject.foobar(1, 2) do |arg|
|
|
711
|
-
passed_in_block_arg = arg
|
|
712
|
-
end
|
|
713
|
-
@passed_in_block_arg = passed_in_block_arg
|
|
714
|
-
|
|
715
|
-
@args = actual_args
|
|
716
|
-
end
|
|
717
|
-
|
|
718
|
-
context "with returns block_callback_strategy" do
|
|
719
|
-
send "DoubleDefinition where #double_definition_creator is a Reimplementation"
|
|
720
|
-
send "#yields"
|
|
721
|
-
|
|
722
|
-
describe "#subject.method_name being called" do
|
|
723
|
-
it "returns the return value of the block" do
|
|
724
|
-
@return_value.should == :new_return_value
|
|
725
|
-
@args.length.should == 3
|
|
726
|
-
@args[0..1].should == [1, 2]
|
|
727
|
-
@args[2].should be_instance_of(Proc)
|
|
728
|
-
end
|
|
729
|
-
end
|
|
730
|
-
end
|
|
731
|
-
|
|
732
|
-
context "with after_call block_callback_strategy" do
|
|
733
|
-
send "DoubleDefinition where #double_definition_creator is a Proxy"
|
|
734
|
-
send "#yields"
|
|
735
|
-
|
|
736
|
-
describe "#subject.method_name being called" do
|
|
737
|
-
it "returns the return value of the block" do
|
|
738
|
-
@return_value.should == :new_return_value
|
|
739
|
-
@args.should == [:original_return_value]
|
|
740
|
-
end
|
|
741
|
-
end
|
|
742
|
-
end
|
|
743
|
-
end
|
|
744
|
-
end
|
|
745
|
-
|
|
746
|
-
describe "#after_call" do
|
|
747
|
-
context "when passed a block" do
|
|
748
|
-
it "returns DoubleDefinition" do
|
|
749
|
-
definition.after_call {}.should === definition
|
|
750
|
-
end
|
|
751
|
-
|
|
752
|
-
describe "#subject.method_name being called" do
|
|
753
|
-
it "calls the block with the return value of the implementation" do
|
|
754
|
-
return_value = {:original => :value}
|
|
755
|
-
definition.with_any_args.returns(return_value).after_call do |value|
|
|
756
|
-
value[:foo] = :bar
|
|
757
|
-
value
|
|
758
|
-
end
|
|
759
|
-
|
|
760
|
-
actual_value = subject.foobar
|
|
761
|
-
actual_value.should === return_value
|
|
762
|
-
actual_value.should == {:original => :value, :foo => :bar}
|
|
763
|
-
end
|
|
764
|
-
|
|
765
|
-
context "when the return value of the #after_call_proc is a DoubleDefinition" do
|
|
766
|
-
it "returns the #subject of the DoubleDefinition" do
|
|
767
|
-
return_value = Object.new
|
|
768
|
-
inner_double_definition = nil
|
|
769
|
-
definition.with_any_args.returns(return_value).after_call do |value|
|
|
770
|
-
inner_double_definition = mock(value).inner_method(1) {:baz}
|
|
771
|
-
end
|
|
772
|
-
|
|
773
|
-
foobar_return_value = subject.foobar
|
|
774
|
-
foobar_return_value.should == inner_double_definition.subject
|
|
775
|
-
foobar_return_value.inner_method(1).should == :baz
|
|
776
|
-
end
|
|
777
|
-
end
|
|
778
|
-
|
|
779
|
-
context "when the return value of the #after_call_proc is a DoubleDefinitionCreatorProxy" do
|
|
780
|
-
it "returns the #__subject__ of the DoubleDefinitionCreatorProxy" do
|
|
781
|
-
return_value = Object.new
|
|
782
|
-
inner_double_proxy = nil
|
|
783
|
-
definition.with_any_args.returns(return_value).after_call do |value|
|
|
784
|
-
inner_double_proxy = mock(value)
|
|
785
|
-
end
|
|
786
|
-
|
|
787
|
-
foobar_return_value = subject.foobar
|
|
788
|
-
foobar_return_value.should == inner_double_proxy.__creator__.subject
|
|
789
|
-
end
|
|
790
|
-
end
|
|
791
|
-
|
|
792
|
-
context "when the return value of the #after_call_proc is an Object" do
|
|
793
|
-
it "returns the return value of the #after_call_proc" do
|
|
794
|
-
return_value = :returns_value
|
|
795
|
-
definition.with_any_args.returns(return_value).after_call do |value|
|
|
796
|
-
:after_call_proc
|
|
797
|
-
end
|
|
798
|
-
|
|
799
|
-
actual_value = subject.foobar
|
|
800
|
-
actual_value.should == :after_call_proc
|
|
801
|
-
end
|
|
802
|
-
end
|
|
803
|
-
end
|
|
804
|
-
end
|
|
805
|
-
|
|
806
|
-
context "when not passed a block" do
|
|
807
|
-
it "raises an ArgumentError" do
|
|
808
|
-
lambda do
|
|
809
|
-
definition.after_call
|
|
810
|
-
end.should raise_error(ArgumentError, "after_call expects a block")
|
|
811
|
-
end
|
|
812
|
-
end
|
|
813
|
-
end
|
|
814
|
-
|
|
815
|
-
describe "#returns" do
|
|
816
|
-
it "returns DoubleDefinition" do
|
|
817
|
-
definition.returns {:baz}.should === definition
|
|
818
|
-
definition.returns(:baz).should === definition
|
|
819
|
-
end
|
|
820
|
-
|
|
821
|
-
context "when passed neither an argument nor a block" do
|
|
822
|
-
describe "#subject.method_name being called" do
|
|
823
|
-
it "returns nil" do
|
|
824
|
-
definition.with_any_args.returns
|
|
825
|
-
subject.foobar.should be_nil
|
|
826
|
-
end
|
|
827
|
-
end
|
|
828
|
-
end
|
|
829
|
-
|
|
830
|
-
context "when passed a block" do
|
|
831
|
-
describe "#subject.method_name being called" do
|
|
832
|
-
it "returns the return value of the block" do
|
|
833
|
-
definition.with_any_args.returns {:baz}
|
|
834
|
-
subject.foobar.should == :baz
|
|
835
|
-
end
|
|
836
|
-
end
|
|
837
|
-
end
|
|
838
|
-
|
|
839
|
-
context "when passed an argument" do
|
|
840
|
-
describe "#subject.method_name being called" do
|
|
841
|
-
it "returns the passed-in argument" do
|
|
842
|
-
definition.returns(:baz).with_no_args
|
|
843
|
-
subject.foobar.should == :baz
|
|
844
|
-
end
|
|
845
|
-
end
|
|
846
|
-
|
|
847
|
-
context "when the argument is false" do
|
|
848
|
-
describe "#subject.method_name being called" do
|
|
849
|
-
it "returns false" do
|
|
850
|
-
definition.returns(false).with_any_args
|
|
851
|
-
subject.foobar.should == false
|
|
852
|
-
end
|
|
853
|
-
end
|
|
854
|
-
end
|
|
855
|
-
end
|
|
856
|
-
|
|
857
|
-
context "when passed both an argument and a block" do
|
|
858
|
-
it "raises an error" do
|
|
859
|
-
lambda do
|
|
860
|
-
definition.returns(:baz) {:another}
|
|
861
|
-
end.should raise_error(ArgumentError, "returns cannot accept both an argument and a block")
|
|
862
|
-
end
|
|
863
|
-
end
|
|
864
|
-
end
|
|
865
|
-
|
|
866
|
-
describe "#implemented_by" do
|
|
867
|
-
it "returns the DoubleDefinition" do
|
|
868
|
-
definition.implemented_by(lambda{:baz}).should === definition
|
|
869
|
-
end
|
|
870
|
-
|
|
871
|
-
context "when passed a Proc" do
|
|
872
|
-
describe "#subject.method_name being called" do
|
|
873
|
-
it "returns the return value of the passed-in Proc" do
|
|
874
|
-
definition.implemented_by(lambda{:baz}).with_no_args
|
|
875
|
-
subject.foobar.should == :baz
|
|
876
|
-
end
|
|
877
|
-
end
|
|
878
|
-
end
|
|
879
|
-
|
|
880
|
-
context "when passed a Method" do
|
|
881
|
-
it "sets the implementation to the passed in method" do
|
|
882
|
-
def subject.foobar(a, b)
|
|
883
|
-
[b, a]
|
|
884
|
-
end
|
|
885
|
-
definition.implemented_by(subject.method(:foobar))
|
|
886
|
-
subject.foobar(1, 2).should == [2, 1]
|
|
887
|
-
end
|
|
888
|
-
end
|
|
889
|
-
end
|
|
890
|
-
|
|
891
|
-
describe "#verbose" do
|
|
892
|
-
it "sets the verbose? to true" do
|
|
893
|
-
definition.should_not be_verbose
|
|
894
|
-
definition.verbose
|
|
895
|
-
definition.should be_verbose
|
|
896
|
-
end
|
|
897
|
-
end
|
|
898
|
-
|
|
899
|
-
describe "#verify_method_signature" do
|
|
900
|
-
it "sets #verify_method_signature? to true" do
|
|
901
|
-
definition.verify_method_signature?.should be_false
|
|
902
|
-
definition.verify_method_signature
|
|
903
|
-
definition.verify_method_signature?.should be_true
|
|
904
|
-
end
|
|
905
|
-
|
|
906
|
-
it "returns self" do
|
|
907
|
-
definition.verify_method_signature.should == definition
|
|
908
|
-
end
|
|
909
|
-
end
|
|
910
|
-
end
|
|
911
|
-
|
|
912
|
-
describe "NestedDoubleCreationMethods" do
|
|
913
|
-
attr_reader :child_double_definition_creator
|
|
914
|
-
after do
|
|
915
|
-
RR.verify(ChildDoubleDefinitionCreator)
|
|
916
|
-
RR.verify(child_double_definition_creator)
|
|
917
|
-
end
|
|
918
|
-
|
|
919
|
-
describe "#mock" do
|
|
920
|
-
it "instantiates a ChildDoubleDefinitionCreator with self and delegates to its #mock method with the passed-in arguments and block" do
|
|
921
|
-
child_subject = Object.new
|
|
922
|
-
child_double_definition_creator = nil
|
|
923
|
-
mock.proxy(ChildDoubleDefinitionCreator).new(definition) do |child_double_definition_creator|
|
|
924
|
-
mock.proxy(child_double_definition_creator).mock(child_subject, :baz)
|
|
925
|
-
child_double_definition_creator = child_double_definition_creator
|
|
926
|
-
end
|
|
927
|
-
|
|
928
|
-
definition.mock(child_subject, :baz)
|
|
929
|
-
@child_double_definition_creator = child_double_definition_creator
|
|
930
|
-
end
|
|
931
|
-
end
|
|
932
|
-
|
|
933
|
-
describe "#mock!" do
|
|
934
|
-
it "instantiates a ChildDoubleDefinitionCreator with self and delegates to its #mock! method with the passed-in arguments and block" do
|
|
935
|
-
child_double_definition_creator = nil
|
|
936
|
-
mock.proxy(ChildDoubleDefinitionCreator).new(definition) do |child_double_definition_creator|
|
|
937
|
-
mock.proxy(child_double_definition_creator).mock!(:baz)
|
|
938
|
-
child_double_definition_creator = child_double_definition_creator
|
|
939
|
-
end
|
|
940
|
-
|
|
941
|
-
definition.mock!(:baz)
|
|
942
|
-
@child_double_definition_creator = child_double_definition_creator
|
|
943
|
-
end
|
|
944
|
-
end
|
|
945
|
-
|
|
946
|
-
describe "#stub" do
|
|
947
|
-
it "instantiates a ChildDoubleDefinitionCreator with self and delegates to its #stub method with the passed-in arguments and block" do
|
|
948
|
-
child_subject = Object.new
|
|
949
|
-
child_double_definition_creator = nil
|
|
950
|
-
mock.proxy(ChildDoubleDefinitionCreator).new(definition) do |child_double_definition_creator|
|
|
951
|
-
mock.proxy(child_double_definition_creator).stub(child_subject, :baz)
|
|
952
|
-
child_double_definition_creator = child_double_definition_creator
|
|
953
|
-
end
|
|
954
|
-
|
|
955
|
-
definition.stub(child_subject, :baz)
|
|
956
|
-
@child_double_definition_creator = child_double_definition_creator
|
|
957
|
-
end
|
|
958
|
-
end
|
|
959
|
-
|
|
960
|
-
describe "#stub!" do
|
|
961
|
-
it "instantiates a ChildDoubleDefinitionCreator with self and delegates to its #stub! method with the passed-in arguments and block" do
|
|
962
|
-
child_double_definition_creator = nil
|
|
963
|
-
mock.proxy(ChildDoubleDefinitionCreator).new(definition) do |child_double_definition_creator|
|
|
964
|
-
mock.proxy(child_double_definition_creator).stub!(:baz)
|
|
965
|
-
child_double_definition_creator = child_double_definition_creator
|
|
966
|
-
end
|
|
967
|
-
|
|
968
|
-
definition.stub!(:baz)
|
|
969
|
-
@child_double_definition_creator = child_double_definition_creator
|
|
970
|
-
end
|
|
971
|
-
end
|
|
972
|
-
|
|
973
|
-
describe "#dont_allow" do
|
|
974
|
-
it "instantiates a ChildDoubleDefinitionCreator with self and delegates to its #dont_allow method with the passed-in arguments and block" do
|
|
975
|
-
child_subject = Object.new
|
|
976
|
-
child_double_definition_creator = nil
|
|
977
|
-
mock.proxy(ChildDoubleDefinitionCreator).new(definition) do |child_double_definition_creator|
|
|
978
|
-
mock.proxy(child_double_definition_creator).dont_allow(child_subject, :baz)
|
|
979
|
-
child_double_definition_creator = child_double_definition_creator
|
|
980
|
-
end
|
|
981
|
-
|
|
982
|
-
definition.dont_allow(child_subject, :baz)
|
|
983
|
-
@child_double_definition_creator = child_double_definition_creator
|
|
984
|
-
end
|
|
985
|
-
end
|
|
986
|
-
|
|
987
|
-
describe "#dont_allow!" do
|
|
988
|
-
it "instantiates a ChildDoubleDefinitionCreator with self and delegates to its #dont_allow! method with the passed-in arguments and block" do
|
|
989
|
-
child_double_definition_creator = nil
|
|
990
|
-
mock.proxy(ChildDoubleDefinitionCreator).new(definition) do |child_double_definition_creator|
|
|
991
|
-
mock.proxy(child_double_definition_creator).dont_allow!(:baz)
|
|
992
|
-
child_double_definition_creator = child_double_definition_creator
|
|
993
|
-
end
|
|
994
|
-
|
|
995
|
-
definition.dont_allow!(:baz)
|
|
996
|
-
@child_double_definition_creator = child_double_definition_creator
|
|
997
|
-
end
|
|
998
|
-
end
|
|
999
|
-
|
|
1000
|
-
describe "#proxy" do
|
|
1001
|
-
it "instantiates a ChildDoubleDefinitionCreator with self and delegates to its #proxy method with the passed-in arguments and block" do
|
|
1002
|
-
child_subject = Object.new
|
|
1003
|
-
child_double_definition_creator = nil
|
|
1004
|
-
mock.proxy(ChildDoubleDefinitionCreator).new(definition) do |child_double_definition_creator|
|
|
1005
|
-
mock.proxy(child_double_definition_creator).proxy(DoubleDefinitionCreator::NO_SUBJECT, nil)
|
|
1006
|
-
child_double_definition_creator = child_double_definition_creator
|
|
1007
|
-
end
|
|
1008
|
-
|
|
1009
|
-
definition.proxy.mock(child_subject)
|
|
1010
|
-
@child_double_definition_creator = child_double_definition_creator
|
|
1011
|
-
end
|
|
1012
|
-
end
|
|
1013
|
-
|
|
1014
|
-
describe "#proxy!" do
|
|
1015
|
-
it "raises a DoubleDefinitionError" do
|
|
1016
|
-
lambda do
|
|
1017
|
-
definition.proxy!(:baz)
|
|
1018
|
-
end.should raise_error(Errors::DoubleDefinitionError)
|
|
1019
|
-
end
|
|
1020
|
-
end
|
|
1021
|
-
|
|
1022
|
-
describe "#strong" do
|
|
1023
|
-
it "instantiates a ChildDoubleDefinitionCreator with self and delegates to its #strong method with the passed-in arguments and block" do
|
|
1024
|
-
child_subject = Object.new
|
|
1025
|
-
child_double_definition_creator = nil
|
|
1026
|
-
mock.proxy(ChildDoubleDefinitionCreator).new(definition) do |child_double_definition_creator|
|
|
1027
|
-
mock.proxy(child_double_definition_creator).strong(DoubleDefinitionCreator::NO_SUBJECT, nil)
|
|
1028
|
-
child_double_definition_creator = child_double_definition_creator
|
|
1029
|
-
end
|
|
1030
|
-
|
|
1031
|
-
definition.strong.mock(child_subject)
|
|
1032
|
-
@child_double_definition_creator = child_double_definition_creator
|
|
1033
|
-
end
|
|
1034
|
-
end
|
|
1035
|
-
|
|
1036
|
-
describe "#strong!" do
|
|
1037
|
-
it "raises a DoubleDefinitionError" do
|
|
1038
|
-
lambda do
|
|
1039
|
-
definition.strong!(:baz)
|
|
1040
|
-
end.should raise_error(Errors::DoubleDefinitionError)
|
|
1041
|
-
end
|
|
1042
|
-
end
|
|
1043
|
-
end
|
|
1044
|
-
|
|
1045
|
-
describe "StateQueryMethods" do
|
|
1046
|
-
describe "#ordered?" do
|
|
1047
|
-
it "defaults to false" do
|
|
1048
|
-
definition.should_not be_ordered
|
|
1049
|
-
end
|
|
1050
|
-
end
|
|
1051
|
-
|
|
1052
|
-
describe "#exact_match?" do
|
|
1053
|
-
context "when no argument_expectation set" do
|
|
1054
|
-
it "raises a DoubleDefinitionError" do
|
|
1055
|
-
definition.argument_expectation = nil
|
|
1056
|
-
lambda do
|
|
1057
|
-
definition.exact_match?
|
|
1058
|
-
end.should raise_error(Errors::DoubleDefinitionError)
|
|
1059
|
-
end
|
|
1060
|
-
end
|
|
1061
|
-
|
|
1062
|
-
context "when arguments are not an exact match" do
|
|
1063
|
-
it "returns false" do
|
|
1064
|
-
definition.with(1, 2, 3)
|
|
1065
|
-
definition.should_not be_exact_match(1, 2)
|
|
1066
|
-
definition.should_not be_exact_match(1)
|
|
1067
|
-
definition.should_not be_exact_match()
|
|
1068
|
-
definition.should_not be_exact_match("does not match")
|
|
1069
|
-
end
|
|
1070
|
-
end
|
|
1071
|
-
|
|
1072
|
-
context "when arguments are an exact match" do
|
|
1073
|
-
it "returns true" do
|
|
1074
|
-
definition.with(1, 2, 3)
|
|
1075
|
-
definition.should be_exact_match(1, 2, 3)
|
|
1076
|
-
end
|
|
1077
|
-
end
|
|
1078
|
-
end
|
|
1079
|
-
|
|
1080
|
-
describe "#wildcard_match?" do
|
|
1081
|
-
context "when no #argument_expectation is set" do
|
|
1082
|
-
it "raises a DoubleDefinitionError" do
|
|
1083
|
-
definition.argument_expectation = nil
|
|
1084
|
-
lambda do
|
|
1085
|
-
definition.wildcard_match?
|
|
1086
|
-
end.should raise_error(Errors::DoubleDefinitionError)
|
|
1087
|
-
end
|
|
1088
|
-
end
|
|
1089
|
-
|
|
1090
|
-
context "when arguments are an exact match" do
|
|
1091
|
-
it "returns true" do
|
|
1092
|
-
definition.with(1, 2, 3)
|
|
1093
|
-
definition.should be_wildcard_match(1, 2, 3)
|
|
1094
|
-
definition.should_not be_wildcard_match(1, 2)
|
|
1095
|
-
definition.should_not be_wildcard_match(1)
|
|
1096
|
-
definition.should_not be_wildcard_match()
|
|
1097
|
-
definition.should_not be_wildcard_match("does not match")
|
|
1098
|
-
end
|
|
1099
|
-
end
|
|
1100
|
-
|
|
1101
|
-
context "when with_any_args" do
|
|
1102
|
-
it "returns true" do
|
|
1103
|
-
definition.with_any_args
|
|
1104
|
-
|
|
1105
|
-
definition.should be_wildcard_match(1, 2, 3)
|
|
1106
|
-
definition.should be_wildcard_match(1, 2)
|
|
1107
|
-
definition.should be_wildcard_match(1)
|
|
1108
|
-
definition.should be_wildcard_match()
|
|
1109
|
-
definition.should be_wildcard_match("does not match")
|
|
1110
|
-
end
|
|
1111
|
-
end
|
|
1112
|
-
end
|
|
1113
|
-
|
|
1114
|
-
describe "#terminal?" do
|
|
1115
|
-
context "when times_matcher's terminal? is true" do
|
|
1116
|
-
it "returns true" do
|
|
1117
|
-
definition.once
|
|
1118
|
-
definition.times_matcher.should be_terminal
|
|
1119
|
-
definition.should be_terminal
|
|
1120
|
-
end
|
|
1121
|
-
end
|
|
1122
|
-
|
|
1123
|
-
context "when times_matcher's terminal? is false" do
|
|
1124
|
-
it "returns false" do
|
|
1125
|
-
definition.any_number_of_times
|
|
1126
|
-
definition.times_matcher.should_not be_terminal
|
|
1127
|
-
definition.should_not be_terminal
|
|
1128
|
-
end
|
|
1129
|
-
end
|
|
1130
|
-
|
|
1131
|
-
context "when there is not times_matcher" do
|
|
1132
|
-
it "raises a DoubleDefinitionError" do
|
|
1133
|
-
definition.times_matcher = nil
|
|
1134
|
-
lambda do
|
|
1135
|
-
definition.terminal?
|
|
1136
|
-
end.should raise_error(Errors::DoubleDefinitionError)
|
|
1137
|
-
end
|
|
1138
|
-
end
|
|
1139
|
-
end
|
|
1140
|
-
|
|
1141
|
-
describe "#expected_arguments" do
|
|
1142
|
-
context "when there is a argument expectation" do
|
|
1143
|
-
it "returns argument expectation's expected_arguments" do
|
|
1144
|
-
definition.with(1, 2)
|
|
1145
|
-
definition.expected_arguments.should == [1, 2]
|
|
1146
|
-
end
|
|
1147
|
-
end
|
|
1148
|
-
|
|
1149
|
-
context "when there is no argument expectation" do
|
|
1150
|
-
it "returns an empty array" do
|
|
1151
|
-
definition.argument_expectation = nil
|
|
1152
|
-
definition.expected_arguments.should == []
|
|
1153
|
-
end
|
|
1154
|
-
end
|
|
1155
|
-
end
|
|
1156
|
-
end
|
|
1157
|
-
end
|
|
1158
|
-
end
|
|
1159
|
-
end
|