Skip to content

API-55276: Update to FakeController#27605

Merged
jeremyhunton-va merged 7 commits intomasterfrom
jeremyhunton-va/API-55276
Apr 8, 2026
Merged

API-55276: Update to FakeController#27605
jeremyhunton-va merged 7 commits intomasterfrom
jeremyhunton-va/API-55276

Conversation

@jeremyhunton-va
Copy link
Copy Markdown
Contributor

@jeremyhunton-va jeremyhunton-va commented Apr 6, 2026

Summary

  • *This work is behind a feature toggle (flipper): NO
  • (Summarize the changes that have been made to the platform)
  1. Changed FakeController namespace in specs to unique names in order to resolve issue with spec class name collisions.

Related issue(s)

Resolve API-55276
image

Affected Areas

modules/appeals_api/spec/controllers/concerns/appeals_api/header_modification_spec.rb
modules/claims_api/spec/concerns/claims_api/v2/claims_requests/supporting_documents_spec.rb
modules/claims_api/spec/concerns/claims_api/v2/claims_requests/tracked_items_assistance_spec.rb
modules/claims_api/spec/concerns/claims_api/v2/claims_requests/tracked_items_spec.rb
modules/claims_api/spec/concerns/claims_api/endpoint_deprecation_spec.rb
modules/claims_api/spec/concerns/claims_api/poa_verification_spec.rb

Testing Plan

  1. Run the following commands (one by one) to make sure the changed spec files still run:
bundle exec rspec modules/appeals_api/spec/controllers/concerns/appeals_api/header_modification_spec.rb
bundle exec rspec modules/claims_api/spec/concerns/claims_api/v2/claims_requests/supporting_documents_spec.rb
bundle exec rspec modules/claims_api/spec/concerns/claims_api/v2/claims_requests/tracked_items_assistance_spec.rb
bundle exec rspec modules/claims_api/spec/concerns/claims_api/v2/claims_requests/tracked_items_spec.rb
bundle exec rspec modules/claims_api/spec/concerns/claims_api/endpoint_deprecation_spec.rb
bundle exec rspec modules/claims_api/spec/concerns/claims_api/poa_verification_spec.rb


  • New code is covered by unit tests
  • Describe what the old behavior was prior to the change
  • Describe the steps required to verify your changes are working as expected. Exclusively stating 'Specs run' is NOT acceptable as appropriate testing
  • If this work is behind a flipper:
    • Tests need to be written for both the flipper on and flipper off scenarios. Docs.
    • What is the testing plan for rolling out the feature?

Screenshots

Note: Optional

What areas of the site does it impact?

(Describe what parts of the site are impacted andifcode touched other areas)

Acceptance criteria

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution
  • Documentation has been updated (link to documentation)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Feature/bug has a monitor built into Datadog (if applicable)
  • If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected
  • I added a screenshot of the developed feature

Requested Feedback

(OPTIONAL)What should the reviewers know in addition to the above. Is there anything specific you wish the reviewer to assist with. Do you have any concerns with this PR, why?

@jeremyhunton-va jeremyhunton-va added the claimsApi modules/claims_api label Apr 6, 2026
@jeremyhunton-va jeremyhunton-va marked this pull request as ready for review April 6, 2026 20:39
@jeremyhunton-va jeremyhunton-va requested review from a team as code owners April 6, 2026 20:39
Copilot AI review requested due to automatic review settings April 6, 2026 20:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates several spec-only “FakeController” definitions to use unique class names, preventing Ruby constant/class reopening collisions across parallelized spec runs (notably in claims_api concerns specs).

Changes:

  • Renamed top-level FakeController classes in multiple specs to unique, concern-specific controller names.
  • Updated corresponding describe blocks and stubs (allow_any_instance_of) to reference the renamed classes.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
modules/appeals_api/spec/controllers/concerns/appeals_api/header_modification_spec.rb Renames the fake controller constant used to test AppealsApi::HeaderModification to avoid cross-spec collisions.
modules/claims_api/spec/concerns/claims_api/v2/claims_requests/supporting_documents_spec.rb Renames the fake controller used to exercise SupportingDocuments methods and updates instantiation.
modules/claims_api/spec/concerns/claims_api/v2/claims_requests/tracked_items_assistance_spec.rb Renames the fake controller constant used to test TrackedItemsAssistance concern helpers.
modules/claims_api/spec/concerns/claims_api/v2/claims_requests/tracked_items_spec.rb Renames the fake controller constant used to test tracked items behavior and BGS interactions.
modules/claims_api/spec/concerns/claims_api/endpoint_deprecation_spec.rb Renames the fake controller constant used to test EndpointDeprecation header behavior.
modules/claims_api/spec/concerns/claims_api/poa_verification_spec.rb Renames the fake controller constant and updates allow_any_instance_of stubs accordingly.

Copy link
Copy Markdown
Contributor

@siddharthalamsal siddharthalamsal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@siddharthalamsal siddharthalamsal requested a review from a team April 8, 2026 13:44
@jeremyhunton-va jeremyhunton-va merged commit 203ac7b into master Apr 8, 2026
42 of 43 checks passed
@jeremyhunton-va jeremyhunton-va deleted the jeremyhunton-va/API-55276 branch April 8, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claimsApi modules/claims_api

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants