In https://github.com/fs/rails-base-graphql-api/blob/master/spec/graphql/mutations/sign_in_with_google_spec.rb we stub some Google API Client classes. I suggest to use stub_request and substitute Google API response. This way we don't need to stub Google API Client library.