spec/spec_helper.rb in fanswatch-0.1.1 vs spec/spec_helper.rb in fanswatch-0.1.2

- old
+ new

@@ -1,5 +1,8 @@ +# frozen_string_literal: true +require 'codeclimate-test-reporter' +CodeClimate::TestReporter.start require 'simplecov' SimpleCov.start require 'yaml' require 'minitest/autorun' @@ -10,20 +13,20 @@ require_relative '../lib/fanswatch' FIXTURES_FOLDER = 'spec/fixtures' CASSETTES_FOLDER = "#{FIXTURES_FOLDER}/cassettes" CASSETTE_FILE = 'facebook_api' -RESULT_FILE = "#{FIXTURES_FOLDER}/results.yml" -FB_RESULT = YAML.load(File.read(RESULT_FILE)) if File.file?('config/credentials.yml') credentials = YAML.load(File.read('config/credentials.yml')) ENV['FB_CLIENT_ID'] = credentials[:client_id] ENV['FB_CLIENT_SECRET'] = credentials[:client_secret] ENV['FB_ACCESS_TOKEN'] = credentials[:access_token] ENV['FB_PAGE_ID'] = credentials[:page_id] end +RESULT_FILE = "#{FIXTURES_FOLDER}/results.yml" +FB_RESULT = YAML.load(File.read(RESULT_FILE)) INVALID_PAGE_ID = 'error_page_id' VCR.configure do |c| c.cassette_library_dir = CASSETTES_FOLDER c.hook_into :webmock \ No newline at end of file