Skip to content

Refactor task loading in three data_post_processing specs and fake deploy time in health_spec#6875

Open
alanparmenter wants to merge 3 commits intorubyforgood:mainfrom
alanparmenter:refactor/task-loading
Open

Refactor task loading in three data_post_processing specs and fake deploy time in health_spec#6875
alanparmenter wants to merge 3 commits intorubyforgood:mainfrom
alanparmenter:refactor/task-loading

Conversation

@alanparmenter
Copy link
Copy Markdown
Contributor

@alanparmenter alanparmenter commented Apr 21, 2026

What github issue is this PR for, if any?

Relates to #6874
(DRY Test Code as part of Test Suite Overhaul)

What changed, and why?

DRY refactor of Rake task loading: narrow loading in three data_post_processing specs, fake deploy time in health_spec, allowing removal of conditional silencing from a deployment task which is no longer called.

These changes avoid repeated loading of the full Rake task suite, which prevents Tasks::LOCK_FILES warnings. A failed-task warning is also prevented by no longer invoking the deployment task during test runs.

Source of deploy-time logic used in the test fake, and the failed-task warning:
https://github.com/alanparmenter/casa/blob/ec28640724df46436d39f7b1e7e82ef5ff673384/lib/tasks/deployment/99991023145114_store_deploy_time.rake#L8-L11

How is this tested? (please write rspec and jest tests!) 💖💪

bundle exec rspec spec/lib/tasks/data_post_processors/case_contact_populator_spec.rb
bundle exec rspec spec/lib/tasks/data_post_processors/contact_topic_populator_spec.rb
bundle exec rspec spec/lib/tasks/data_post_processors/contact_type_populator_spec.rb
bundle exec rspec spec/requests/health_spec.rb
bundle exec rspec spec

Screenshots please :)

Before:
Screenshot 2026-04-21 at 20 51 37
After:
Screenshot 2026-04-21 at 20 40 40

Feelings gif (optional)

Homer Simpson's Rake of Procrastination

…pecs, fake deploy time in health_spec, and remove conditional silencing in deployment task
@github-actions github-actions Bot added ruby Pull requests that update Ruby code Tests! 🎉💖👏 labels Apr 21, 2026
@alanparmenter alanparmenter marked this pull request as draft April 21, 2026 20:55
@alanparmenter alanparmenter marked this pull request as ready for review April 21, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ruby Pull requests that update Ruby code Tests! 🎉💖👏

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant