Category "stub"

Trying to test (minitest) method that invokes AWS S3 Bucket copy_to. How to mock or stub?

We have an Attachment model with a copy_for_edit! method which helps an Attachment copy itself. The attachment data is stored in AWS S3 bucket(s). We make use o

Stub "new Date()" with Cypress

In my tests, "new Date()" returns the current date, but I want it return a constant object. But I don't know how to stub this. Example of what I would like : cy

Cypress - How can I check Google Events fired before the new page loads

This is the scenario: User accesses index.com Clicks the X button A Google Analytic event is fired here <-- I want to check this event User is redirected to

What does "to stub" mean in programming?

For example, what does it mean in this quote? Integrating with an external API is almost a guarantee in any modern web app. To effectively test such integra