Sha256: 952fbf2ec0329cd2fca1bcf6ff1f2ad0c1d3e740322bc97dcc9a7b724a55c338

Contents?: true

Size: 1.21 KB

Versions: 1

Compression:

Stored size: 1.21 KB

Contents

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
RSPEC_ROOT = File.dirname(__FILE__)
GEM_ROOT = File.expand_path("..", RSPEC_ROOT)

require 'simplecov'
SimpleCov.root GEM_ROOT
SimpleCov.start do
  add_filter "/spec/"
  add_filter "/.bundle/"
end

require 'dotenv'
require 'rspec'
require 'rspec/its'
require 'webmock/rspec'
require 'factory_bot'
require 'faker'
require 'byebug'
require 'hubspot-api-ruby'

Dotenv.load('.env.test')

# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories.
Dir["#{RSPEC_ROOT}/support/**/*.rb"].each {|f| require f}

# Require shared examples
Dir["#{RSPEC_ROOT}/shared_examples/**/*.rb"].each {|f| require f}

RSpec.configure do |config|
  config.before(:all) do
    Hubspot.configure(hapikey: ENV.fetch("HUBSPOT_HAPI_KEY"))
  end

  config.before(:each) do
    Hubspot.configure(hapikey: ENV.fetch("HUBSPOT_HAPI_KEY"))
  end

  # config.after(:each) do
  #   Hubspot::Config.reset!
  # end

  config.filter_run_when_matching :focus

  # Setup FactoryBot
  config.include FactoryBot::Syntax::Methods
  config.before(:suite) do
    FactoryBot.find_definitions
  end

  config.extend CassetteHelper
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hubspot-api-ruby-0.9.0 spec/spec_helper.rb