Skip to content

Stub GitHub API calls #338

@courte

Description

@courte

Description
We're currently using VCR to stub GitHub API calls in the specs for multiple classes. Right now, this adds over 2K lines to the codebase.

We'd like to keep the VCR cassettes for all Github service object specs, and replace any VCRs associated with Event, User, Project, FeaturedProject, and/or EventRegistration with a simpler stubbing method. Now that we know it works, it would also be nice to shorten the date-span being passed to the API (thus meaning a smaller number of results).

Ask
Use RSpec stubbing to avoid using calls to the Github service object in any unit tests that are not the actual Github service object.

To Do (This work should be more than one pull request.)

  • Stub out Github service object calls
    • in the User specs
    • in the Project specs
    • in the FeaturedProject specs
    • in the EventRegistration specs
  • Delete unnecessary VCR .yml files post-stubbing.
  • Use shorter time periods for the existing Github service object calls

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions