0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-06 13:08:40 +08:00
discourse/plugins/automation/spec/scripts
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
..
add_user_to_group_through_custom_field_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
append_last_checked_by_spec.rb DEV: Prefer RSpec primitives for test setup (#42122) 2026-07-30 11:17:22 +08:00
append_last_edited_by_spec.rb DEV: Prefer RSpec primitives for test setup (#42122) 2026-07-30 11:17:22 +08:00
auto_responder_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
auto_tag_topic_spec.rb DEV: Add automatically closed topics event trigger and adapt the automation plugin's auto tag_topic_script accordingly (#39235) 2026-04-14 14:50:36 -05:00
banner_topic_spec.rb DEV: Improve banner topic permissions for read-restricted and unlisted topics (#38556) 2026-03-16 11:45:07 -05:00
close_topic_spec.rb
email_on_flagged_post_spec.rb FEATURE: New automation for emailing specific users when a post is flagged (#36580) 2025-12-11 10:31:13 +08:00
flag_post_on_words_spec.rb
gift_exchange_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
group_category_notification_default_spec.rb
pin_topic_spec.rb
post_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
remove_upload_markup_from_deleted_posts_spec.rb FIX: do not remove uploads from posts that are still in review queue (#37372) 2026-01-29 17:00:33 +05:30
send_pms_spec.rb FEATURE: support target_user_ids for private messages (#37708) 2026-02-12 09:21:40 +11:00
set_topic_timer_spec.rb FIX: Prevent automation set_topic_timer from reopening closed topics (#39375) 2026-04-21 15:08:31 +02:00
suspend_user_by_email_spec.rb
topic_required_words_spec.rb
topic_spec.rb FIX: Scope duplicate topic title check to what the user can see (#41871) 2026-07-24 15:35:35 +02:00
user_global_notice_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
user_group_membership_through_badge_spec.rb DEV: Prefer RSpec primitives for test setup (#42122) 2026-07-30 11:17:22 +08:00
zapier_webhook_spec.rb