0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-05 17:25:34 +08:00
discourse/plugins/discourse-rewind/spec/actions
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
..
activity_calendar_spec.rb
best_posts_spec.rb FIX: Hidden post excerpts can appear in public BestPosts rewinds (#40146) 2026-05-19 11:06:19 +10:00
best_topics_spec.rb SECURITY: BestTopics report includes unlisted topics (#41000) 2026-06-17 17:27:13 -04:00
chat_usage_spec.rb
fbff_spec.rb
most_viewed_categories_spec.rb
most_viewed_tags_spec.rb DEV: Follow up spec fix (#37698) 2026-02-11 11:51:51 +08:00
reading_time_spec.rb DEV: Prefer RSpec primitives for test setup (#42122) 2026-07-30 11:17:22 +08:00
top_words_spec.rb
writing_analysis_spec.rb FIX: Do not count deleted posts or topics in Rewind score calculation (#37434) 2026-02-02 17:00:49 +10:00