require "codeclimate-test-reporter" CodeClimate::TestReporter.start require 'simplecov' SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[SimpleCov::Formatter::HTMLFormatter] SimpleCov.start # require 'dotenv' # Dotenv.load require 'datarank' require 'rspec' require 'webmock/rspec' require 'vcr' VCR.configure do |c| c.configure_rspec_metadata! c.cassette_library_dir = 'spec/cassettes' c.hook_into :webmock c.default_cassette_options = { :record => :new_episodes } end # The API key for use during testing # # @return The account's username. def datarank_apikey ENV.fetch 'DATARANK_AUTHORIZATION_KEY' end # The API Version for testing # # @return The account's username. def datarank_api_version ENV.fetch 'DATARANK_API_VERSION' end # An Datarank object # # @return The authenticated client. def authenticated_client VCR.use_cassette('authenticated_client') do Datarank::Client.new datarank_apikey, datarank_api_version end end