0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-09 21:45:25 +08:00
discourse/plugins/chat/spec/lib/chat
Alan Guo Xiang Tan 6df9b0b357
DEV: Prefer RSpec primitives for test setup (#42122)
RSpec setup becomes harder to follow at either extreme: trivial fixture
wrappers hide lifecycle and intent, while forcing every named operation
inline repeats low-level protocol and configuration details.

This change documents and applies a test-setup hierarchy:

- use `fab!`, `let`, `let!`, `subject`, and inline `Fabricate` according
to lifecycle and role;
- use a small example-group method when parameterized behavior gives one
spec useful vocabulary;
- move helpers into auto-loaded `spec/support` only when they are shared
across spec files;
- use fabricators and page objects for the data shapes and system-test
interfaces they own.

Core and plugin support files are loaded centrally by `rails_helper`, so
plugin-specific support loaders are unnecessary. The migration specs
encountered during the sweep are removed according to repository policy;
production migrations are unchanged.
2026-07-30 11:17:22 +08:00
..
channel_archive_service_spec.rb DEV: Prefer RSpec primitives for test setup (#42122) 2026-07-30 11:17:22 +08:00
channel_fetcher_spec.rb DEV: Prefer RSpec primitives for test setup (#42122) 2026-07-30 11:17:22 +08:00
channel_hashtag_data_source_spec.rb
channel_membership_manager_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
core_pretty_text_spec.rb FIX: supports html entities in chat (#34591) 2025-08-28 07:34:24 +02:00
duplicate_message_validator_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
guardian_extensions_spec.rb SECURITY: Enforce recipient PM allowlists for existing direct chat channels (#41923) 2026-07-22 12:11:42 -05:00
inline_onebox_handler_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
message_bookmarkable_spec.rb DEV: Don't use fab! for non-ActiveRecord model objects (#39272) 2026-04-15 00:52:34 +02:00
message_mover_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
message_processor_spec.rb FEATURE: Add /me actions to chat 2026-07-29 14:36:34 +00:00
message_reactor_spec.rb FEATURE: Restore web push quick reply for chat messages (#39614) 2026-04-29 12:36:03 -03:00
messages_exporter_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
notifier_spec.rb FEATURE: Restore web push quick reply for chat messages (#39614) 2026-04-29 12:36:03 -03:00
onebox_handler_spec.rb FIX: Chat channel onebox icons render and support channel emoji (#39826) 2026-05-11 15:17:36 +02:00
parsed_mentions_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
post_notification_handler_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
push_notification_filter_spec.rb UX: Consolidate chat notifications into live notification preferences (#41538) 2026-07-14 08:32:48 +02:00
review_queue_spec.rb FIX: Refresh chat reviewable payload when re-flagging an edited message (#41739) 2026-07-15 11:55:13 -03:00
slack_compatibility_spec.rb
statistics_spec.rb DEV: Prefer RSpec primitives for test setup (#42122) 2026-07-30 11:17:22 +08:00
transcript_service_spec.rb DEV: Fix a chat archive edge-case (#39625) 2026-04-29 11:38:55 +02:00