From 5286788f2d5b705933b1967e166bbe0cfd2b1ce5 Mon Sep 17 00:00:00 2001 From: Nicholas Lee Date: Tue, 20 Feb 2024 09:45:18 -0800 Subject: [PATCH] Ensure `api_error` is loaded in `api_client` Require default gems for test suite Fix `MiniTest` namespace issue --- lib/plaid/api_client.rb | 1 + test/test_helper.rb | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/plaid/api_client.rb b/lib/plaid/api_client.rb index b5cbe2940..f5327f398 100644 --- a/lib/plaid/api_client.rb +++ b/lib/plaid/api_client.rb @@ -20,6 +20,7 @@ require 'tempfile' require 'faraday' require 'faraday/multipart' +require_relative 'api_error' module Plaid class ApiClient diff --git a/test/test_helper.rb b/test/test_helper.rb index d3772831c..57c8f284f 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,13 +1,22 @@ +require 'bundler' + +begin + Bundler.setup(:default, :development) +rescue Bundler::BundlerError => e + warn e.message + warn 'Run `bundle install` to install missing gems' + exit e.status_code +end + +require "plaid" require "minitest/autorun" require "minitest/around/unit" require "json" -require_relative "../lib/plaid" - # Internal: Default read timeout for HTTP calls in seconds. NETWORK_TIMEOUT = 600 -class PlaidTest < MiniTest::Test +class PlaidTest < Minitest::Test attr_reader :client, :item, :access_token def create_client