Skip to content

5563 - Replace helper spec stubs with real tests - #7084

Merged
compwron merged 5 commits into
rubyforgood:mainfrom
fuentesjr:5563-helper-specs
Jul 29, 2026
Merged

5563 - Replace helper spec stubs with real tests#7084
compwron merged 5 commits into
rubyforgood:mainfrom
fuentesjr:5563-helper-specs

Conversation

@fuentesjr

Copy link
Copy Markdown
Contributor

What github issue is this PR for, if any?

Part of #5563, intentionally not Resolves — 16 stub specs remain after this.

What changed, and why?

Replaces five pending "add some tests for X" stubs under spec/helpers/ with
real specs (one commit per file), following existing helper-spec style
(mileage_rates_helper_spec.rb, court_dates_helper_spec.rb):

  • DateHelper — the substantive one: validate_date (parses valid parts,
    raises Date::Error on any blank part) and parse_date (the Rails
    multiparameter (1i)/(2i)/(3i) happy path, the invalid-date path that adds a
    model error and leaves the field unset, and the all-blank case that strips the
    date-part keys and adds no date)
  • TemplateHelper — tag sanitize/validate helpers and active_if /
    active_if_status
  • AllCasaAdmins::CasaOrgsHelperselected_organization returns the
    assigned @casa_org (and nil when unassigned)
  • RequestHeaderHelper / ApiBaseHelper — constant-value pins; these modules
    define only constants, so a value assertion is the available real coverage

No production code changed.

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

  • bundle exec rspec spec/helpers/{request_header,template,date,api_base}_helper_spec.rb spec/helpers/all_casa_admins/casa_orgs_helper_spec.rb
    → 26 examples, 0 failures
  • bundle exec standardrb on the five files → no offenses
  • No pending / skip / xit remains in any of them

Screenshots please :)

N/A — test-only change, no UI.

Feelings gif (optional)

N/A

@github-actions github-actions Bot added 🧪 Tests Tests ruby Touches Ruby code labels Jul 28, 2026
@compwron
compwron merged commit 3f9b463 into rubyforgood:main Jul 29, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ruby Touches Ruby code 🧪 Tests Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants