rubyforgood / rubyforgood/casa
DRY Test Code
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 381
- Forks
- 542
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 47
Description
Description
There's a lot of duplicate code within the test files. For each file, find the duplicate code and group it under a shared example or a private function.
A lot of the code follows the pattern: admin can do action, supervisor can usually do the same action, volunteer might be able to do the action as well. Since the code describing the action isn't DRY, the admin and supervisor tests might become divergent if the code in their blocks aren't duplicated.
How to access the QA site
Login Details:
Link to QA site
Login Emails:
- volunteer1@example.com view site as a volunteer
- supervisor1@example.com view site as a supervisor
- casa_admin1@example.com view site as an admin
- all_casa_admin1@example.com view site as an all casa admin
- go to
/all_casa_admins/sign_in
- go to
password for all users: 12345678
Questions? Join Slack!
We highly recommend that you join us in slack #casa channel to ask questions quickly. And discord for office hours (currently Tuesday 5-7pm Pacific), stakeholder news, and upcoming new issues.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by surveying the repository's test files and identify repeated action and role-specific test blocks, especially the admin, supervisor, and volunteer patterns described in the issue. Refactor duplicate sections into shared examples or private functions, then run the relevant test files to confirm the role behavior remains consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- testing-qa
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100