0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-04 10:39:43 +08:00
discourse/spec/tasks
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
..
assets_precompile_spec.rb DEV: Cache AssetProcessor code in development (#38036) 2026-02-25 11:24:41 +00:00
compatibility_spec.rb
destroy_spec.rb
hashtags_spec.rb
incoming_emails_spec.rb
migrate_advanced_search_banner_to_welcome_banner_spec.rb DEV: Silence expected error/debug output in core specs (#39247) 2026-04-14 11:04:10 +02:00
migrate_discourse_gifs_to_core_multisite_spec.rb DEV: better multisite suppport for migrate gifs (#40792) 2026-06-11 17:51:27 +04:00
migrate_discourse_gifs_to_core_spec.rb DEV: Prefer RSpec primitives for test setup (#42122) 2026-07-30 11:17:22 +08:00
nested_replies_spec.rb PERF: Add fast nested reply stats preparation (#41870) 2026-07-21 10:45:53 -05:00
plugin_spec.rb DEV: Prune branches on plugin:update (#38128) 2026-02-28 00:14:50 +01:00
posts_spec.rb FIX: PG::UniqueViolation for PostTimings in posts:reorder_posts rake task when PostTiming records have no corresponding Post (#35212) 2025-10-08 18:48:21 +02:00
qunit_cli_spec.rb DEV: Fail fast when the qunit browser stalls (#41919) 2026-07-22 12:43:54 -03:00
redis_spec.rb
release_spec.rb DEV: Use precise dates in versions.json (#42129) 2026-07-29 15:21:42 +01:00
site_settings_spec.rb FIX: type: objects uploads should be stored as IDs (#40178) 2026-05-21 13:45:27 -03:00
themes_spec.rb FEATURE: rake tasks to export/import theme bundles 2026-04-30 21:03:48 +00:00
topic_localizations_spec.rb DEV: Add rake task to backfill localization excerpts which were empty (#36901) 2025-12-30 17:04:36 +08:00
topics_spec.rb
uploads_spec.rb DEV: Move test cleanup to correct scope in tasks/uploads_spec.rb (#36386) 2025-12-02 17:45:28 +01:00
users_spec.rb