card 1.17.4 → 1.18.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/VERSION +1 -1
- data/card.gemspec +24 -25
- data/config/initializers/01_init_ruby_extensions.rb +0 -4
- data/config/initializers/inflections.rb +1 -1
- data/config/initializers/notification.rb +2 -2
- data/db/migrate/20110511221913_require_earlier_migrations.rb +3 -3
- data/db/migrate/20120105203350_require_1_8_migrations.rb +3 -3
- data/db/migrate/20121111025347_require_1_10_migrations.rb +3 -3
- data/db/migrate/20130106052640_table_cleanup.rb +4 -4
- data/db/migrate/20130411210957_update_codenames.rb +2 -2
- data/db/migrate/20141001105348_move_revisions_to_actions.rb +4 -4
- data/db/migrate/20141121172918_rename_card_migration_table.rb +2 -2
- data/db/migrate/20141208132159_remove_present_from_reference_table.rb +2 -2
- data/db/migrate/20141216053032_better_index_names.rb +9 -9
- data/db/migrate_core_cards/20120611203506_rails_inflection_updates.rb +29 -32
- data/db/migrate_core_cards/20130411191151_renaming_for_menu.rb +3 -4
- data/db/migrate_core_cards/20130411211600_delete_old_related_tab_cards.rb +1 -1
- data/db/migrate_core_cards/20130419215612_import_help_text.rb +1 -2
- data/db/migrate_core_cards/20130823192433_add_style_cards.rb +3 -3
- data/db/migrate_core_cards/20130910183318_move_styles_to_content.rb +2 -3
- data/db/migrate_core_cards/20130920214038_jsonize_tinymce.rb +2 -2
- data/db/migrate_core_cards/20130920291703_update_stylesheets.rb +1 -2
- data/db/migrate_core_cards/20130927191728_account_events.rb +5 -6
- data/db/migrate_core_cards/20131016172445_common_css_patch.rb +2 -3
- data/db/migrate_core_cards/20140110193325_reset_account_request_type.rb +0 -1
- data/db/migrate_core_cards/20140307231621_user_data_to_cards.rb +23 -32
- data/db/migrate_core_cards/20140317035504_account_requests_to_signups.rb +1 -7
- data/db/migrate_core_cards/20140512155840_add_script_cards.rb +21 -24
- data/db/migrate_core_cards/20140629222005_add_email_cards.rb +17 -22
- data/db/migrate_core_cards/20140725180118_config_card_updates.rb +2 -2
- data/db/migrate_core_cards/20141111083921_delete_machine_output.rb +1 -3
- data/db/migrate_core_cards/20141115034214_config_descriptions_etc.rb +2 -2
- data/db/migrate_core_cards/20141119001955_make_symlinks_relative.rb +3 -3
- data/db/migrate_core_cards/20141120120605_fix_notification_html_message.rb +1 -1
- data/db/migrate_core_cards/20141204061304_watchers_to_following.rb +8 -12
- data/db/migrate_core_cards/20141208162106_add_ace_script.rb +2 -3
- data/db/migrate_core_cards/20141216155251_add_more_following_cards.rb +10 -10
- data/db/migrate_core_cards/20150202143810_import_bootstrap_layout.rb +10 -12
- data/db/migrate_core_cards/20150220134731_following_to_follow_rule.rb +4 -4
- data/db/migrate_core_cards/20150317162412_bootstrap_themes.rb +3 -3
- data/db/migrate_core_cards/20150326205655_bootswatch_themes.rb +7 -7
- data/db/migrate_core_cards/20150429090551_search_card_context.rb +18 -20
- data/db/migrate_core_cards/20150508212032_menu_compatibility.rb +3 -7
- data/db/migrate_core_cards/20150510031118_fix_skin_images.rb +2 -3
- data/db/migrate_core_cards/20150528084659_add_session_cardtype.rb +3 -3
- data/db/migrate_core_cards/20150601133433_add_recent_setting_session_card.rb +4 -4
- data/db/migrate_core_cards/20150610171702_add_debugger_session_card.rb +4 -4
- data/db/migrate_core_cards/20150610180019_add_recaptcha_key_and_admin_info_cards.rb +5 -11
- data/db/migrate_core_cards/20150724123438_update_file_and_image_cards.rb +29 -35
- data/db/migrate_core_cards/20150824135418_update_file_history.rb +10 -14
- data/db/migrate_core_cards/20150903130006_attachment_upload_cards.rb +1 -1
- data/db/schema.rb +92 -94
- data/db/seed/new/card_actions.yml +461 -469
- data/db/seed/new/card_acts.yml +154 -172
- data/db/seed/new/card_changes.yml +4076 -4031
- data/db/seed/new/card_references.yml +1584 -1927
- data/db/seed/new/cards.yml +2095 -2112
- data/db/seed/test/fixtures/card_actions.yml +1497 -1505
- data/db/seed/test/fixtures/card_acts.yml +454 -472
- data/db/seed/test/fixtures/card_changes.yml +7309 -7263
- data/db/seed/test/fixtures/card_references.yml +2263 -2613
- data/db/seed/test/fixtures/cards.yml +3298 -3316
- data/db/seed/test/seed.rb +3 -0
- data/lib/card.rb +17 -9
- data/lib/card/active_record_ext.rb +6 -8
- data/lib/card/active_record_helper.rb +42 -32
- data/lib/card/auth.rb +3 -3
- data/lib/card/cache.rb +4 -4
- data/lib/card/cache/persistent.rb +9 -5
- data/lib/card/cache/temporary.rb +5 -5
- data/lib/card/chunk.rb +1 -1
- data/lib/card/codename.rb +3 -2
- data/lib/card/content.rb +62 -57
- data/lib/card/core_ext.rb +20 -30
- data/lib/card/diff.rb +88 -76
- data/lib/card/director_register.rb +66 -0
- data/lib/card/env.rb +14 -17
- data/lib/card/exceptions.rb +7 -9
- data/lib/card/format.rb +18 -367
- data/lib/card/format/nest.rb +183 -0
- data/lib/card/format/permission.rb +63 -0
- data/lib/card/format/render.rb +140 -0
- data/lib/card/loader.rb +17 -26
- data/lib/card/location.rb +6 -6
- data/lib/card/mailer.rb +4 -7
- data/lib/card/migration.rb +1 -1
- data/lib/card/name.rb +3 -6
- data/lib/card/query.rb +8 -8
- data/lib/card/query/attributes.rb +6 -6
- data/lib/card/query/clause.rb +10 -10
- data/lib/card/query/join.rb +7 -9
- data/lib/card/query/reference.rb +17 -19
- data/lib/card/query/sql_statement.rb +2 -2
- data/lib/card/query/value.rb +15 -16
- data/lib/card/set.rb +106 -209
- data/lib/card/set/event.rb +126 -0
- data/lib/card/set_pattern.rb +42 -29
- data/lib/card/simplecov_helper.rb +19 -19
- data/lib/card/spec_helper.rb +40 -16
- data/lib/card/stage.rb +72 -0
- data/lib/card/stage_director.rb +231 -0
- data/lib/card/subcards.rb +56 -24
- data/lib/card/subdirector_array.rb +31 -0
- data/lib/card/success.rb +15 -18
- data/lib/card/version.rb +1 -2
- data/lib/card/view_cache.rb +4 -4
- data/lib/card/view_name.rb +10 -8
- data/lib/cardio.rb +1 -1
- data/lib/generators/card.rb +2 -4
- data/lib/generators/card/format/format_generator.rb +4 -4
- data/lib/generators/card/migration/migration_generator.rb +6 -6
- data/lib/generators/card/set/set_generator.rb +5 -6
- data/mod/01_core/chunk/include.rb +2 -1
- data/mod/01_core/chunk/link.rb +2 -2
- data/mod/01_core/chunk/literal.rb +6 -9
- data/mod/01_core/chunk/query_reference.rb +1 -1
- data/mod/01_core/chunk/reference.rb +2 -2
- data/mod/01_core/chunk/uri.rb +52 -63
- data/mod/01_core/format/html_format.rb +8 -12
- data/mod/01_core/format/text_format.rb +1 -1
- data/mod/01_core/set/all/actify.rb +96 -0
- data/mod/01_core/set/all/active_card.rb +7 -7
- data/mod/01_core/set/all/collection.rb +19 -20
- data/mod/01_core/set/all/content.rb +9 -7
- data/mod/01_core/set/all/erb.rb +5 -5
- data/mod/01_core/set/all/event.rb +60 -0
- data/mod/01_core/set/all/fetch.rb +13 -19
- data/mod/01_core/set/all/haml.rb +1 -1
- data/mod/01_core/set/all/initialize.rb +35 -41
- data/mod/01_core/set/all/location_history.rb +3 -5
- data/mod/01_core/set/all/name.rb +19 -68
- data/mod/01_core/set/all/name_validations.rb +56 -0
- data/mod/01_core/set/all/pattern.rb +2 -2
- data/mod/01_core/set/all/permissions.rb +14 -20
- data/mod/01_core/set/all/phases.rb +9 -200
- data/mod/01_core/set/all/references.rb +10 -10
- data/mod/01_core/set/all/rules.rb +3 -4
- data/mod/01_core/set/all/stages.rb +24 -0
- data/mod/01_core/set/all/states.rb +4 -4
- data/mod/01_core/set/all/subcards.rb +16 -26
- data/mod/01_core/set/all/templating.rb +1 -3
- data/mod/01_core/set/all/tracked_attributes.rb +47 -48
- data/mod/01_core/set/all/trash.rb +10 -10
- data/mod/01_core/set/all/type.rb +9 -8
- data/mod/01_core/set/all/utils.rb +10 -14
- data/mod/01_core/set/all/view_cache.rb +2 -2
- data/mod/01_core/set_pattern/01_all.rb +3 -3
- data/mod/01_core/set_pattern/02_all_plus.rb +3 -3
- data/mod/01_core/set_pattern/03_type.rb +2 -2
- data/mod/01_core/set_pattern/04_star.rb +3 -3
- data/mod/01_core/set_pattern/05_rstar.rb +3 -3
- data/mod/01_core/set_pattern/06_right.rb +2 -2
- data/mod/01_core/set_pattern/07_type_plus_right.rb +2 -2
- data/mod/01_core/set_pattern/08_self.rb +1 -1
- data/mod/01_core/spec/chunk/literal_spec.rb +7 -8
- data/mod/01_core/spec/chunk/uri_spec.rb +140 -142
- data/mod/01_core/spec/format/html_format_spec.rb +72 -57
- data/mod/01_core/spec/set/all/collection_spec.rb +63 -43
- data/mod/01_core/spec/set/all/content_spec.rb +4 -4
- data/mod/01_core/spec/set/all/fetch_spec.rb +12 -3
- data/mod/01_core/spec/set/all/name_spec.rb +3 -4
- data/mod/01_core/spec/set/all/pattern_spec.rb +32 -35
- data/mod/01_core/spec/set/all/permissions_spec.rb +17 -5
- data/mod/01_core/spec/set/all/phases_spec.rb +0 -1
- data/mod/01_core/spec/set/all/references_spec.rb +1 -1
- data/mod/01_core/spec/set/all/rules2_spec.rb +79 -91
- data/mod/01_core/spec/set/all/rules_spec.rb +63 -56
- data/mod/01_core/spec/set/all/templating_spec.rb +0 -1
- data/mod/01_core/spec/set/all/tracked_attributes_spec.rb +4 -5
- data/mod/01_core/spec/set/all/trash_spec.rb +23 -1
- data/mod/01_core/spec/set/all/type_spec.rb +2 -5
- data/mod/01_history/lib/card/action.rb +8 -10
- data/mod/01_history/set/all/actions.rb +2 -4
- data/mod/01_history/set/all/content_history.rb +38 -32
- data/mod/01_history/set/all/history.rb +20 -17
- data/mod/02_basic_types/format/rss_format.rb +0 -1
- data/mod/02_basic_types/set/all/all_css.rb +9 -13
- data/mod/02_basic_types/set/all/all_csv.rb +14 -17
- data/mod/02_basic_types/set/all/all_js.rb +3 -4
- data/mod/02_basic_types/set/all/base.rb +2 -2
- data/mod/02_basic_types/set/all/file.rb +2 -5
- data/mod/02_basic_types/set/all/json.rb +19 -18
- data/mod/02_basic_types/set/all/rss.rb +3 -3
- data/mod/02_basic_types/set/all/text.rb +1 -3
- data/mod/02_basic_types/set/type/html.rb +4 -8
- data/mod/02_basic_types/set/type/plain_text.rb +2 -3
- data/mod/02_basic_types/set/type/pointer.rb +82 -92
- data/mod/02_basic_types/spec/set/all/all_css_spec.rb +2 -2
- data/mod/02_basic_types/spec/set/all/all_csv_spec.rb +6 -4
- data/mod/02_basic_types/spec/set/all/base_spec.rb +6 -6
- data/mod/02_basic_types/spec/set/all/json_spec.rb +8 -8
- data/mod/02_basic_types/spec/set/type/plain_text_spec.rb +3 -3
- data/mod/02_basic_types/spec/set/type/pointer_spec.rb +29 -32
- data/mod/03_machines/lib/card/machine.rb +95 -81
- data/mod/03_machines/lib/card/machine_input.rb +35 -34
- data/mod/03_machines/set/right/machine_input.rb +1 -1
- data/mod/03_machines/set/self/script_ace.rb +2 -3
- data/mod/03_machines/set/self/script_card_menu.rb +2 -3
- data/mod/03_machines/set/self/script_jquery_helper.rb +2 -2
- data/mod/03_machines/set/self/script_slot.rb +2 -2
- data/mod/03_machines/set/self/style_bootstrap_compatible.rb +1 -1
- data/mod/03_machines/set/self/style_cards.rb +1 -1
- data/mod/03_machines/set/self/style_jquery_ui_smoothness.rb +0 -1
- data/mod/03_machines/set/type/coffee_script.rb +9 -13
- data/mod/03_machines/set/type/css.rb +12 -13
- data/mod/03_machines/set/type/java_script.rb +6 -8
- data/mod/03_machines/set/type/scss.rb +4 -5
- data/mod/03_machines/set/type/skin.rb +3 -6
- data/mod/03_machines/spec/lib/shared_machine_examples.rb +31 -38
- data/mod/03_machines/spec/lib/shared_machine_input_examples.rb +7 -8
- data/mod/03_machines/spec/set/type/coffeescript_spec.rb +19 -13
- data/mod/03_machines/spec/set/type/css_spec.rb +22 -16
- data/mod/03_machines/spec/set/type/scss_spec.rb +28 -21
- data/mod/03_machines/spec/set/type/skin_spec.rb +28 -30
- data/mod/04_settings/lib/card/setting.rb +4 -4
- data/mod/04_settings/set/abstract/permission.rb +30 -37
- data/mod/04_settings/set/right/add_help.rb +3 -3
- data/mod/04_settings/set/right/script.rb +4 -5
- data/mod/04_settings/set/right/structure.rb +3 -4
- data/mod/04_settings/set/right/style.rb +3 -3
- data/mod/04_settings/set/self/add_help.rb +1 -1
- data/mod/04_settings/set/self/input.rb +1 -1
- data/mod/04_settings/set/self/on_create.rb +1 -1
- data/mod/04_settings/set/self/options.rb +1 -1
- data/mod/04_settings/set/self/options_label.rb +1 -1
- data/mod/04_settings/set/type/setting.rb +29 -44
- data/mod/04_settings/spec/set/right/comment_spec.rb +9 -12
- data/mod/04_settings/spec/set/right/script_spec.rb +7 -7
- data/mod/04_settings/spec/set/right/structure_spec.rb +13 -12
- data/mod/04_settings/spec/set/right/style_spec.rb +13 -13
- data/mod/04_settings/spec/set/type/setting_spec.rb +1 -1
- data/mod/05_email/format/email_html_format.rb +1 -1
- data/mod/05_email/format/email_text_format.rb +2 -2
- data/mod/05_email/lib/card/follow_option.rb +12 -15
- data/mod/05_email/set/all/email_html.rb +2 -3
- data/mod/05_email/set/all/email_text.rb +3 -3
- data/mod/05_email/set/all/follow.rb +14 -22
- data/mod/05_email/set/all/notify.rb +11 -11
- data/mod/05_email/set/all/observer.rb +7 -8
- data/mod/05_email/set/right/bcc.rb +4 -9
- data/mod/05_email/set/right/follow.rb +26 -39
- data/mod/05_email/set/right/follow_fields.rb +2 -2
- data/mod/05_email/set/right/followers.rb +3 -1
- data/mod/05_email/set/right/following.rb +13 -16
- data/mod/05_email/set/self/always.rb +1 -2
- data/mod/05_email/set/self/created.rb +4 -6
- data/mod/05_email/set/self/edited.rb +3 -7
- data/mod/05_email/set/self/follow_defaults.rb +11 -12
- data/mod/05_email/set/self/never.rb +2 -4
- data/mod/05_email/set/type/email_template.rb +40 -27
- data/mod/05_email/set/type_plus_right/user/follow.rb +159 -157
- data/mod/05_email/spec/set/all/follow_spec.rb +28 -37
- data/mod/05_email/spec/set/all/notify_spec.rb +21 -26
- data/mod/05_email/spec/set/all/observer_spec.rb +58 -37
- data/mod/05_email/spec/set/right/followers_spec.rb +9 -14
- data/mod/05_email/spec/set/right/following_spec.rb +1 -1
- data/mod/05_email/spec/set/self/follow_defaults_spec.rb +1 -1
- data/mod/05_standard/lib/carrier_wave/cardmount.rb +9 -9
- data/mod/05_standard/lib/file_uploader.rb +8 -13
- data/mod/05_standard/lib/image_uploader.rb +8 -9
- data/mod/05_standard/set/abstract/attachment.rb +26 -43
- data/mod/05_standard/set/all/account.rb +2 -2
- data/mod/05_standard/set/all/comment.rb +11 -13
- data/mod/05_standard/set/all/error.rb +18 -18
- data/mod/05_standard/set/all/event_viz.rb +16 -29
- data/mod/05_standard/set/all/links.rb +35 -34
- data/mod/05_standard/set/all/list_changes.rb +10 -12
- data/mod/05_standard/set/all/rich_html/content.rb +13 -13
- data/mod/05_standard/set/all/rich_html/editing.rb +5 -5
- data/mod/05_standard/set/all/rich_html/form.rb +22 -26
- data/mod/05_standard/set/all/rich_html/header.rb +18 -25
- data/mod/05_standard/set/all/rich_html/menu.rb +20 -22
- data/mod/05_standard/set/all/rich_html/modal.rb +3 -3
- data/mod/05_standard/set/all/rich_html/toolbar.rb +49 -58
- data/mod/05_standard/set/all/rich_html/wrapper.rb +40 -41
- data/mod/05_standard/set/right/account.rb +26 -14
- data/mod/05_standard/set/right/email.rb +2 -2
- data/mod/05_standard/set/right/password.rb +6 -5
- data/mod/05_standard/set/right/salt.rb +2 -2
- data/mod/05_standard/set/right/stats.rb +17 -20
- data/mod/05_standard/set/right/token.rb +1 -1
- data/mod/05_standard/set/right/when_created.rb +1 -1
- data/mod/05_standard/set/right/when_last_edited.rb +1 -1
- data/mod/05_standard/set/rstar/rules.rb +3 -3
- data/mod/05_standard/set/rstar/rules_editor.rb +39 -39
- data/mod/05_standard/set/self/account_links.rb +21 -22
- data/mod/05_standard/set/self/admin_info.rb +5 -5
- data/mod/05_standard/set/self/alerts.rb +1 -1
- data/mod/05_standard/set/self/all.rb +1 -1
- data/mod/05_standard/set/self/foot.rb +1 -1
- data/mod/05_standard/set/self/head.rb +19 -22
- data/mod/05_standard/set/self/navbox.rb +3 -7
- data/mod/05_standard/set/self/now.rb +1 -1
- data/mod/05_standard/set/self/recent.rb +19 -25
- data/mod/05_standard/set/self/search.rb +2 -4
- data/mod/05_standard/set/self/signin.rb +6 -6
- data/mod/05_standard/set/self/stats.rb +31 -38
- data/mod/05_standard/set/self/version.rb +1 -2
- data/mod/05_standard/set/type/basic.rb +15 -17
- data/mod/05_standard/set/type/cardtype.rb +3 -3
- data/mod/05_standard/set/type/date.rb +1 -2
- data/mod/05_standard/set/type/file.rb +22 -33
- data/mod/05_standard/set/type/image.rb +30 -23
- data/mod/05_standard/set/type/layout_type.rb +4 -4
- data/mod/05_standard/set/type/list.rb +32 -38
- data/mod/05_standard/set/type/listed_by.rb +11 -13
- data/mod/05_standard/set/type/number.rb +5 -6
- data/mod/05_standard/set/type/phrase.rb +1 -1
- data/mod/05_standard/set/type/search_type.rb +25 -23
- data/mod/05_standard/set/type/session.rb +2 -3
- data/mod/05_standard/set/type/set.rb +46 -51
- data/mod/05_standard/set/type/signup.rb +18 -19
- data/mod/05_standard/set/type/toggle.rb +5 -5
- data/mod/05_standard/set/type/user.rb +6 -6
- data/mod/05_standard/spec/chunk/include_spec.rb +115 -98
- data/mod/05_standard/spec/chunk/link_spec.rb +58 -31
- data/mod/05_standard/spec/chunk/query_reference_spec.rb +12 -14
- data/mod/05_standard/spec/set/all/email_html_spec.rb +3 -3
- data/mod/05_standard/spec/set/all/error_spec.rb +3 -3
- data/mod/05_standard/spec/set/all/history_spec.rb +52 -38
- data/mod/05_standard/spec/set/all/links_spec.rb +2 -2
- data/mod/05_standard/spec/set/all/rich_html/editing_spec.rb +0 -1
- data/mod/05_standard/spec/set/all/rich_html/form_spec.rb +11 -11
- data/mod/05_standard/spec/set/all/rich_html/wrapper_spec.rb +4 -4
- data/mod/05_standard/spec/set/right/email_spec.rb +1 -4
- data/mod/05_standard/spec/set/right/password_spec.rb +4 -7
- data/mod/05_standard/spec/set/right/stats_spec.rb +2 -3
- data/mod/05_standard/spec/set/right/when_created_spec.rb +1 -1
- data/mod/05_standard/spec/set/right/when_last_edited_spec.rb +1 -1
- data/mod/05_standard/spec/set/rstar/rules_spec.rb +6 -6
- data/mod/05_standard/spec/set/self/all_spec.rb +11 -13
- data/mod/05_standard/spec/set/self/head_spec.rb +1 -3
- data/mod/05_standard/spec/set/self/navbox_spec.rb +1 -1
- data/mod/05_standard/spec/set/self/now_spec.rb +2 -2
- data/mod/05_standard/spec/set/self/signin_spec.rb +1 -1
- data/mod/05_standard/spec/set/self/stats_spec.rb +1 -1
- data/mod/05_standard/spec/set/self/version_spec.rb +2 -2
- data/mod/05_standard/spec/set/type/cardtype_spec.rb +3 -4
- data/mod/05_standard/spec/set/type/date_spec.rb +1 -1
- data/mod/05_standard/spec/set/type/email_template_spec.rb +5 -5
- data/mod/05_standard/spec/set/type/file_spec.rb +50 -28
- data/mod/05_standard/spec/set/type/html_spec.rb +12 -7
- data/mod/05_standard/spec/set/type/image_spec.rb +55 -45
- data/mod/05_standard/spec/set/type/layout_type_spec.rb +2 -2
- data/mod/05_standard/spec/set/type/listed_by_spec.rb +2 -2
- data/mod/05_standard/spec/set/type/number_spec.rb +1 -1
- data/mod/05_standard/spec/set/type/phrase_spec.rb +1 -1
- data/mod/05_standard/spec/set/type/search_type_spec.rb +15 -16
- data/mod/05_standard/spec/set/type/set_spec.rb +16 -17
- data/mod/05_standard/spec/set/type/signup_spec.rb +7 -5
- data/mod/05_standard/spec/set/type/toggle_spec.rb +4 -4
- data/mod/05_standard/spec/set/type/uri_spec.rb +11 -11
- data/mod/05_standard/spec/set/type/user_spec.rb +0 -1
- data/mod/06_bootstrap/set/all/bootstrap/form.rb +9 -10
- data/mod/06_bootstrap/set/all/bootstrap/helper.rb +22 -27
- data/mod/06_bootstrap/set/all/bootstrap/wrapper.rb +1 -2
- data/mod/06_bootstrap/set/all/rich_bootstrap.rb +1 -3
- data/mod/06_bootstrap/set/self/bootstrap_cards.rb +2 -2
- data/mod/06_bootstrap/set/self/bootstrap_js.rb +2 -2
- data/mod/06_bootstrap/set/self/bootswatch_shared.rb +19 -19
- data/mod/06_bootstrap/set/self/smartmenu_css.rb +2 -2
- data/mod/06_bootstrap/set/self/smartmenu_js.rb +3 -3
- data/mod/06_bootstrap/spec/set/all/bootstrap/form_spec.rb +5 -5
- data/spec/lib/card/action_spec.rb +4 -4
- data/spec/lib/card/cache_spec.rb +3 -5
- data/spec/lib/card/chunk_spec.rb +6 -8
- data/spec/lib/card/codename_spec.rb +4 -6
- data/spec/lib/card/content_spec.rb +12 -17
- data/spec/lib/card/diff_spec.rb +59 -61
- data/spec/lib/card/format_spec.rb +55 -34
- data/spec/lib/card/loader_spec.rb +35 -37
- data/spec/lib/card/name_spec.rb +159 -145
- data/spec/lib/card/query_spec.rb +4 -4
- data/spec/lib/card/reference_spec.rb +24 -24
- data/spec/lib/card/set_pattern_spec.rb +3 -3
- data/spec/lib/card/stage_director_spec.rb +218 -0
- data/spec/lib/card/subcards_spec.rb +12 -16
- data/spec/lib/card/success_spec.rb +16 -18
- data/spec/lib/card/view_cache_spec.rb +1 -1
- data/spec/mailers/mailer_spec.rb +3 -5
- data/spec/models/card/cardtype_spec.rb +40 -51
- data/spec/models/card/create_spec.rb +58 -39
- data/spec/models/card/trash_spec.rb +23 -32
- data/spec/models/card/type_transition_spec.rb +41 -32
- data/spec/models/card/validation_spec.rb +13 -15
- data/spec/models/card_spec.rb +48 -59
- data/spec/spec_helper.rb +26 -31
- metadata +16 -2
@@ -1,81 +1,78 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
2
|
|
3
3
|
describe Card::Set::All::Pattern do
|
4
|
-
|
5
4
|
describe :set_names do
|
6
|
-
it
|
5
|
+
it 'returns self, type, all for simple cards' do
|
7
6
|
Card::Auth.as_bot do
|
8
|
-
card = Card.new(
|
9
|
-
expect(card.set_names).to eq([
|
7
|
+
card = Card.new(name: 'AnewCard')
|
8
|
+
expect(card.set_names).to eq(['Basic+*type', '*all'])
|
10
9
|
card.save!
|
11
|
-
card = Card.fetch(
|
12
|
-
expect(card.set_names).to eq([
|
10
|
+
card = Card.fetch('AnewCard')
|
11
|
+
expect(card.set_names).to eq(['AnewCard+*self', 'Basic+*type', '*all'])
|
13
12
|
end
|
14
13
|
end
|
15
14
|
|
16
|
-
it
|
15
|
+
it 'returns set names for simple star cards' do
|
17
16
|
Card::Auth.as_bot do
|
18
17
|
expect(Card.fetch('*update').set_names).to eq([
|
19
|
-
|
20
|
-
|
18
|
+
'*update+*self', '*star', 'Setting+*type', '*all'
|
19
|
+
])
|
21
20
|
end
|
22
21
|
end
|
23
22
|
|
24
|
-
it
|
23
|
+
it 'returns set names for junction cards' do
|
25
24
|
Card::Auth.as_bot do
|
26
|
-
expect(Card.new(
|
27
|
-
|
28
|
-
|
25
|
+
expect(Card.new(name: 'Iliad+author').set_names).to eq([
|
26
|
+
'Book+author+*type plus right', 'author+*right', 'Basic+*type', '*all plus', '*all'
|
27
|
+
])
|
29
28
|
end
|
30
29
|
end
|
31
30
|
|
32
|
-
it
|
31
|
+
it 'returns set names for compound star cards' do
|
33
32
|
Card::Auth.as_bot do
|
34
|
-
expect(Card.new(
|
35
|
-
|
36
|
-
|
33
|
+
expect(Card.new(name: 'Iliad+*to').set_names).to eq([
|
34
|
+
'Book+*to+*type plus right', '*to+*right', '*rstar', 'Pointer+*type', '*all plus', '*all'
|
35
|
+
])
|
37
36
|
end
|
38
37
|
end
|
39
38
|
|
40
|
-
it
|
39
|
+
it 'handles type plus right prototypes properly' do # right place for this? really need more prototype tests...
|
41
40
|
Card::Auth.as_bot do
|
42
41
|
expect(Card.fetch('Fruit+flavor+*type plus right').prototype.set_names.include?('Fruit+flavor+*type plus right')).to be_truthy
|
43
42
|
end
|
44
43
|
end
|
45
44
|
end
|
46
45
|
|
47
|
-
|
48
46
|
describe :rule_set_keys do
|
49
|
-
it
|
50
|
-
card = Card.new name:
|
51
|
-
expect(card.rule_set_keys).to eq([
|
47
|
+
it 'returns correct set names for new cards' do
|
48
|
+
card = Card.new name: 'AnewCard'
|
49
|
+
expect(card.rule_set_keys).to eq(["#{Card::BasicID}+type", 'all'])
|
52
50
|
end
|
53
|
-
|
54
51
|
end
|
55
52
|
|
56
53
|
describe :safe_set_keys do
|
57
|
-
it
|
54
|
+
it 'returns css names for simple star cards' do
|
58
55
|
Card::Auth.as_bot do
|
59
|
-
card = Card.new(
|
60
|
-
expect(card.safe_set_keys).to eq(
|
56
|
+
card = Card.new(name: '*AnewCard')
|
57
|
+
expect(card.safe_set_keys).to eq('ALL TYPE-basic STAR')
|
61
58
|
card.save!
|
62
|
-
card = Card.fetch(
|
63
|
-
expect(card.safe_set_keys).to eq(
|
59
|
+
card = Card.fetch('*AnewCard')
|
60
|
+
expect(card.safe_set_keys).to eq('ALL TYPE-basic STAR SELF-Xanew_card')
|
64
61
|
end
|
65
62
|
end
|
66
63
|
|
67
|
-
it
|
68
|
-
card=Card.new(
|
69
|
-
expect(card.safe_set_keys).to eq(
|
64
|
+
it 'returns set names for junction cards' do
|
65
|
+
card = Card.new(name: 'Iliad+author')
|
66
|
+
expect(card.safe_set_keys).to eq('ALL ALL_PLUS TYPE-basic RIGHT-author TYPE_PLUS_RIGHT-book-author')
|
70
67
|
card.save!
|
71
|
-
card = Card.fetch(
|
72
|
-
expect(card.safe_set_keys).to eq(
|
68
|
+
card = Card.fetch('Iliad+author')
|
69
|
+
expect(card.safe_set_keys).to eq('ALL ALL_PLUS TYPE-basic RIGHT-author TYPE_PLUS_RIGHT-book-author SELF-iliad-author')
|
73
70
|
end
|
74
71
|
end
|
75
72
|
|
76
73
|
describe :label do
|
77
|
-
it
|
78
|
-
expect(Card.new(name: 'address+*right').label).to eq(%
|
74
|
+
it 'returns label for name' do
|
75
|
+
expect(Card.new(name: 'address+*right').label).to eq(%(All "+address" cards))
|
79
76
|
end
|
80
77
|
end
|
81
78
|
end
|
@@ -264,9 +264,7 @@ describe Card::Set::All::Permissions do
|
|
264
264
|
it 'reader setting' do
|
265
265
|
Card.where(trash: false).each do |ca|
|
266
266
|
rule_id, rule_class = ca.permission_rule_id_and_class(:read)
|
267
|
-
|
268
|
-
# {c.read_rule_class}, #{prc.second}, #{prc.first.inspect}" unless
|
269
|
-
# prc.last == c.read_rule_class && prc.first.id == c.read_rule_id
|
267
|
+
next if rule_class != ca.read_rule_class
|
270
268
|
expect(rule_class).to eq(ca.read_rule_class)
|
271
269
|
expect(rule_id).to eq(ca.read_rule_id)
|
272
270
|
end
|
@@ -447,14 +445,14 @@ describe Card::Set::All::Permissions do
|
|
447
445
|
|
448
446
|
# X,Y in Anon, auth Member, auth Nonmember, admin
|
449
447
|
|
450
|
-
%
|
448
|
+
%(
|
451
449
|
A V C J G
|
452
450
|
A * * * * *
|
453
451
|
V * * . * .
|
454
452
|
C * * * . .
|
455
453
|
J * * . . .
|
456
454
|
G * . . . .
|
457
|
-
|
455
|
+
)
|
458
456
|
end
|
459
457
|
end
|
460
458
|
|
@@ -517,6 +515,20 @@ describe Card::Set::All::Permissions do
|
|
517
515
|
end
|
518
516
|
end
|
519
517
|
end
|
518
|
+
|
519
|
+
it 'create read rule as subcard' do
|
520
|
+
Card::Auth.as_bot do
|
521
|
+
Card.create! name: 'read rule test',
|
522
|
+
subcards: {
|
523
|
+
'+*self+*read' => { content: '[[Administrator]]' }
|
524
|
+
}
|
525
|
+
expect(Card['read rule test'].read_rule_class)
|
526
|
+
.to eq('*self')
|
527
|
+
rule_id = Card.fetch_id 'read rule test+*self+*read'
|
528
|
+
expect(Card['read rule test'].read_rule_id)
|
529
|
+
.to eq(rule_id)
|
530
|
+
end
|
531
|
+
end
|
520
532
|
end
|
521
533
|
|
522
534
|
# FIXME-perm
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
2
|
|
3
3
|
describe Card::Set::All::References do
|
4
|
-
it 'should replace references should work on
|
4
|
+
it 'should replace references should work on nests inside links' do
|
5
5
|
card = Card.create! name: 'ref test', content: '[[test_card|test{{test}}]]'
|
6
6
|
assert_equal '[[test_card|test{{best}}]]',
|
7
7
|
card.replace_reference_syntax('test', 'best')
|
@@ -1,12 +1,10 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
2
|
|
3
|
-
|
4
|
-
#FIXME - this seems like a LOT of testing but it doesn't cover a ton of ground
|
3
|
+
# FIXME: - this seems like a LOT of testing but it doesn't cover a ton of ground
|
5
4
|
# I think we should move the rendering tests into basic and trim this to about a quarter of its current length
|
6
5
|
|
7
6
|
describe Card do
|
8
7
|
context 'when there is a general toc rule of 2' do
|
9
|
-
|
10
8
|
before do
|
11
9
|
Card::Auth.as_bot do
|
12
10
|
Card.create! name: 'Basic+*type+*table of contents', content: '2'
|
@@ -18,14 +16,14 @@ describe Card do
|
|
18
16
|
expect(@rule_card = @c1.rule_card(:table_of_contents)).to be
|
19
17
|
end
|
20
18
|
|
21
|
-
describe
|
22
|
-
it
|
23
|
-
expect(@rule_card.content).to eq(
|
24
|
-
expect(@c1.rule(:table_of_contents)).to eq(
|
19
|
+
describe '.rule' do
|
20
|
+
it 'should have a value of 2' do
|
21
|
+
expect(@rule_card.content).to eq('2')
|
22
|
+
expect(@c1.rule(:table_of_contents)).to eq('2')
|
25
23
|
end
|
26
24
|
end
|
27
25
|
|
28
|
-
describe
|
26
|
+
describe 'renders with/without toc' do
|
29
27
|
it "should not render for 'Onne Heading'" do
|
30
28
|
expect(@c1.format.render_open_content).not_to match /Table of Contents/
|
31
29
|
end
|
@@ -37,64 +35,61 @@ describe Card do
|
|
37
35
|
end
|
38
36
|
end
|
39
37
|
|
40
|
-
describe
|
41
|
-
it
|
38
|
+
describe '.rule_card' do
|
39
|
+
it 'get the same card without the * and singular' do
|
42
40
|
expect(@c1.rule_card(:table_of_contents)).to eq(@rule_card)
|
43
41
|
end
|
44
42
|
end
|
45
43
|
|
46
|
-
describe
|
47
|
-
it
|
44
|
+
describe '.related_sets' do
|
45
|
+
it 'has 1 set (right) for a simple card' do
|
48
46
|
sets = Card['A'].related_sets.map { |s| s[0] }
|
49
47
|
expect(sets).to eq(['A+*right'])
|
50
48
|
end
|
51
|
-
it
|
49
|
+
it 'has 2 sets (type, and right) for a cardtype card' do
|
52
50
|
sets = Card['Cardtype A'].related_sets.map { |s| s[0] }
|
53
51
|
expect(sets).to eq(['Cardtype A+*type', 'Cardtype A+*right'])
|
54
52
|
end
|
55
|
-
# it "should show type plus right sets when they exist" do
|
56
|
-
# Card::Auth.as_bot { Card.create name: 'Basic+A+*type plus right', content: '' }
|
57
|
-
# sets = Card['A'].related_sets
|
58
|
-
# sets.should == ['A+*self', 'A+*right', 'Basic+A+*type plus right']
|
59
|
-
# end
|
60
|
-
# it "should show type plus right sets when they exist, and type" do
|
61
|
-
# Card::Auth.as_bot { Card.create name: 'Basic+Cardtype A+*type plus right', content: '' }
|
62
|
-
# sets = Card['Cardtype A'].related_sets
|
63
|
-
# sets.should == ['Cardtype A+*self', 'Cardtype A+*type', 'Cardtype A+*right', 'Basic+Cardtype A+*type plus right']
|
64
|
-
# end
|
65
|
-
it
|
53
|
+
# it "should show type plus right sets when they exist" do
|
54
|
+
# Card::Auth.as_bot { Card.create name: 'Basic+A+*type plus right', content: '' }
|
55
|
+
# sets = Card['A'].related_sets
|
56
|
+
# sets.should == ['A+*self', 'A+*right', 'Basic+A+*type plus right']
|
57
|
+
# end
|
58
|
+
# it "should show type plus right sets when they exist, and type" do
|
59
|
+
# Card::Auth.as_bot { Card.create name: 'Basic+Cardtype A+*type plus right', content: '' }
|
60
|
+
# sets = Card['Cardtype A'].related_sets
|
61
|
+
# sets.should == ['Cardtype A+*self', 'Cardtype A+*type', 'Cardtype A+*right', 'Basic+Cardtype A+*type plus right']
|
62
|
+
# end
|
63
|
+
it 'is empty for a non-simple card' do
|
66
64
|
sets = Card['A+B'].related_sets.map { |s| s[0] }
|
67
65
|
expect(sets).to eq([])
|
68
66
|
end
|
69
67
|
end
|
70
|
-
|
71
|
-
#
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
end
|
77
|
-
=end
|
68
|
+
# # class methods
|
69
|
+
# describe ".default_rule" do
|
70
|
+
# it 'should have default rule' do
|
71
|
+
# Card.default_rule(:table_of_contents).should == '0'
|
72
|
+
# end
|
73
|
+
# end
|
78
74
|
end
|
79
75
|
|
80
|
-
context
|
81
|
-
|
76
|
+
context 'when I change the general toc setting to 1' do
|
82
77
|
before do
|
83
|
-
expect(@c1 = Card[
|
84
|
-
expect(@c2 = Card[
|
78
|
+
expect(@c1 = Card['Onne Heading']).to be
|
79
|
+
expect(@c2 = Card['Twwo Heading']).to be
|
85
80
|
expect(@c1.type_id).to eq(Card::BasicID)
|
86
81
|
expect(@rule_card = @c1.rule_card(:table_of_contents)).to be
|
87
|
-
@rule_card.content =
|
82
|
+
@rule_card.content = '1'
|
88
83
|
end
|
89
84
|
|
90
|
-
describe
|
91
|
-
it
|
92
|
-
expect(@rule_card.content).to eq(
|
93
|
-
expect(@c1.rule(:table_of_contents)).to eq(
|
85
|
+
describe '.rule' do
|
86
|
+
it 'should have a value of 1' do
|
87
|
+
expect(@rule_card.content).to eq('1')
|
88
|
+
expect(@c1.rule(:table_of_contents)).to eq('1')
|
94
89
|
end
|
95
90
|
end
|
96
91
|
|
97
|
-
describe
|
92
|
+
describe 'renders with/without toc' do
|
98
93
|
it "should not render toc for 'Onne Heading'" do
|
99
94
|
expect(@c1.format.render_open_content).to match /Table of Contents/
|
100
95
|
end
|
@@ -102,24 +97,22 @@ describe Card do
|
|
102
97
|
expect(@c2.format.render_open_content).to match /Table of Contents/
|
103
98
|
end
|
104
99
|
it "should not render for 'Twwo Heading' when changed to 3" do
|
105
|
-
@rule_card.content =
|
106
|
-
expect(@c2.rule(:table_of_contents)).to eq(
|
100
|
+
@rule_card.content = '3'
|
101
|
+
expect(@c2.rule(:table_of_contents)).to eq('3')
|
107
102
|
expect(@c2.format.render_open_content).not_to match /Table of Contents/
|
108
103
|
end
|
109
104
|
end
|
110
|
-
|
111
105
|
end
|
112
106
|
|
113
107
|
context 'when I use CardtypeE cards' do
|
114
|
-
|
115
108
|
before do
|
116
109
|
Card::Auth.as_bot do
|
117
|
-
@c1 = Card.create name: 'toc1', type:
|
118
|
-
|
119
|
-
@c2 = Card.create name: 'toc2', type:
|
120
|
-
|
121
|
-
@c3 = Card.create name: 'toc3', type:
|
122
|
-
|
110
|
+
@c1 = Card.create name: 'toc1', type: 'CardtypeE',
|
111
|
+
content: Card['Onne Heading'].content
|
112
|
+
@c2 = Card.create name: 'toc2', type: 'CardtypeE',
|
113
|
+
content: Card['Twwo Heading'].content
|
114
|
+
@c3 = Card.create name: 'toc3', type: 'CardtypeE',
|
115
|
+
content: Card['Three Heading'].content
|
123
116
|
end
|
124
117
|
expect(@c1.type_name).to eq('Cardtype E')
|
125
118
|
@rule_card = @c1.rule_card(:table_of_contents)
|
@@ -130,14 +123,14 @@ describe Card do
|
|
130
123
|
expect(@rule_card).to be
|
131
124
|
end
|
132
125
|
|
133
|
-
describe
|
134
|
-
it
|
135
|
-
expect(@c1.rule(:table_of_contents)).to eq(
|
136
|
-
expect(@rule_card.content).to eq(
|
126
|
+
describe '.rule' do
|
127
|
+
it 'should have a value of 0' do
|
128
|
+
expect(@c1.rule(:table_of_contents)).to eq('0')
|
129
|
+
expect(@rule_card.content).to eq('0')
|
137
130
|
end
|
138
131
|
end
|
139
132
|
|
140
|
-
describe
|
133
|
+
describe 'renders without toc' do
|
141
134
|
it "should not render for 'Onne Heading'" do
|
142
135
|
expect(@c1.format.render_open_content).not_to match /Table of Contents/
|
143
136
|
end
|
@@ -149,32 +142,30 @@ describe Card do
|
|
149
142
|
end
|
150
143
|
end
|
151
144
|
|
152
|
-
describe
|
145
|
+
describe '.rule_card' do
|
153
146
|
it "doesn't have a type rule" do
|
154
147
|
expect(@rule_card).to be
|
155
|
-
expect(@rule_card.name).to eq(
|
148
|
+
expect(@rule_card.name).to eq('*all+*table of contents')
|
156
149
|
end
|
157
150
|
|
158
|
-
it
|
151
|
+
it 'get the same card without the * and singular' do
|
159
152
|
expect(@c1.rule_card(:table_of_contents)).to eq(@rule_card)
|
160
153
|
end
|
161
154
|
end
|
162
155
|
|
163
|
-
|
164
|
-
#
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
end
|
170
|
-
=end
|
156
|
+
# # class methods
|
157
|
+
# describe ".default_rule" do
|
158
|
+
# it 'should have default rule' do
|
159
|
+
# Card.default_rule(:table_of_contents).should == '0'
|
160
|
+
# end
|
161
|
+
# end
|
171
162
|
end
|
172
163
|
|
173
|
-
context
|
164
|
+
context 'when I create a new rule' do
|
174
165
|
before do
|
175
166
|
Card::Auth.as_bot do
|
176
167
|
Card.create! name: 'Basic+*type+*table of contents', content: '2'
|
177
|
-
@c1 = Card.create! name: 'toc1', type:
|
168
|
+
@c1 = Card.create! name: 'toc1', type: 'CardtypeE', content: Card['Onne Heading'].content
|
178
169
|
@c2 = Card.create! name: 'toc2', content: Card['Twwo Heading'].content
|
179
170
|
@c3 = Card.create! name: 'toc3', content: Card['Three Heading'].content
|
180
171
|
expect(@c1.type_name).to eq('Cardtype E')
|
@@ -184,26 +175,26 @@ describe Card do
|
|
184
175
|
expect(@c2).to be
|
185
176
|
expect(@c3).to be
|
186
177
|
expect(@rule_card.name).to eq('*all+*table of contents')
|
187
|
-
if c=Card['CardtypeE+*type+*table of content']
|
178
|
+
if c = Card['CardtypeE+*type+*table of content']
|
188
179
|
c.content = '2'
|
189
180
|
c.save!
|
190
181
|
else
|
191
|
-
c=Card.create! name: 'CardtypeE+*type+*table of content', content: '2'
|
182
|
+
c = Card.create! name: 'CardtypeE+*type+*table of content', content: '2'
|
192
183
|
end
|
193
184
|
end
|
194
185
|
end
|
195
|
-
it
|
186
|
+
it 'should take on new setting value' do
|
196
187
|
c = Card['toc1']
|
197
188
|
expect(c.rule_card(:table_of_contents).name).to eq('CardtypeE+*type+*table of content')
|
198
|
-
expect(c.rule(:table_of_contents)).to eq(
|
189
|
+
expect(c.rule(:table_of_contents)).to eq('2')
|
199
190
|
end
|
200
191
|
|
201
|
-
describe
|
192
|
+
describe 'renders with/without toc' do
|
202
193
|
it "should not render for 'Onne Heading'" do
|
203
194
|
expect(@c1.format.render_open_content).not_to match /Table of Contents/
|
204
195
|
end
|
205
196
|
it "should render for 'Twwo Heading'" do
|
206
|
-
expect(@c2.rule(:table_of_contents)).to eq(
|
197
|
+
expect(@c2.rule(:table_of_contents)).to eq('2')
|
207
198
|
expect(@c2.format.render_open_content).to match /Table of Contents/
|
208
199
|
end
|
209
200
|
it "should render for 'Three Heading'" do
|
@@ -211,28 +202,27 @@ describe Card do
|
|
211
202
|
end
|
212
203
|
end
|
213
204
|
end
|
214
|
-
#end
|
215
|
-
|
216
|
-
context "when I change the general toc setting to 1" do
|
205
|
+
# end
|
217
206
|
|
207
|
+
context 'when I change the general toc setting to 1' do
|
218
208
|
before do
|
219
|
-
expect(@c1 = Card[
|
209
|
+
expect(@c1 = Card['Onne Heading']).to be
|
220
210
|
# FIXME: CardtypeE should inherit from *default => Basic
|
221
|
-
|
222
|
-
expect(@c2 = Card[
|
211
|
+
# @c2 = Card.create name: 'toc2', type: "CardtypeE", content: Card['Twwo Heading'].content
|
212
|
+
expect(@c2 = Card['Twwo Heading']).to be
|
223
213
|
expect(@c1.type_id).to eq(Card::BasicID)
|
224
214
|
expect(@rule_card = @c1.rule_card(:table_of_contents)).to be
|
225
|
-
@rule_card.content =
|
215
|
+
@rule_card.content = '1'
|
226
216
|
end
|
227
217
|
|
228
|
-
describe
|
229
|
-
it
|
230
|
-
expect(@rule_card.content).to eq(
|
231
|
-
expect(@c1.rule(:table_of_contents)).to eq(
|
218
|
+
describe '.rule' do
|
219
|
+
it 'should have a value of 1' do
|
220
|
+
expect(@rule_card.content).to eq('1')
|
221
|
+
expect(@c1.rule(:table_of_contents)).to eq('1')
|
232
222
|
end
|
233
223
|
end
|
234
224
|
|
235
|
-
describe
|
225
|
+
describe 'renders with/without toc' do
|
236
226
|
it "should not render toc for 'Onne Heading'" do
|
237
227
|
expect(@c1.format.render_open_content).to match /Table of Contents/
|
238
228
|
end
|
@@ -240,11 +230,9 @@ describe Card do
|
|
240
230
|
expect(@c2.format.render_open_content).to match /Table of Contents/
|
241
231
|
end
|
242
232
|
it "should not render for 'Twwo Heading' when changed to 3" do
|
243
|
-
@rule_card.content =
|
233
|
+
@rule_card.content = '3'
|
244
234
|
expect(@c2.format.render_open_content).not_to match /Table of Contents/
|
245
235
|
end
|
246
236
|
end
|
247
|
-
|
248
237
|
end
|
249
238
|
end
|
250
|
-
|