Let's say that in our application, we need to fetch events from our Google Calendar. So if we want to write test cases verifying this logic, then we ought to mock the API calls to Google APIs.
We can use Webmock to mock these requests. But let's see how we can do this in a DRY fashion.
First let's start by creating a support file at test/support/google_calendar_api_support.rb
and add the following content to it:
# frozen_string_literal: true
module GoogleCalendarApiSupport