Sha256: 83abe4ab25b3583390aa6dc6afad9f98c53948b865b791f98fcfadb013b771ad

Contents?: true

Size: 1.11 KB

Versions: 5

Compression:

Stored size: 1.11 KB

Contents

# encoding: utf-8

require 'simplecov'
SimpleCov.start

if ENV['TRAVIS']
  require 'coveralls'
  Coveralls.wear!
end

ENV['FIXER_CLIENT_ID']     = '1111111111111111111111111111111111111111111111111111111111111111'
ENV['FIXER_CLIENT_SECRET'] = '2222222222222222222222222222222222222222222222222222222222222222'

require 'dotenv'
Dotenv.load '.env-fixer_client'

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)

require 'minitest'
require 'minitest/autorun'
require 'minitest/spec'
require 'minitest/mock'
require 'fileutils'
require 'active_support'
require 'webmock/minitest'
require 'hashie/mash'

require 'fixer_client'

Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].each {|f| require f}

# helper method to create mashified test docs, that look like what comes out of the faraday middleware
def mashify(body)
  case body
  when Hash
    ::Hashie::Mash.new(body)
  when Array
    body.map { |item| parse(item) }
  else
    body
  end
end

def json_fixture(name)
  mashify(JSON.parse(json_file(name)))
end

def json_file(name)
  File.read( File.dirname(__FILE__) + "/fixtures/#{name}.json")
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fixer_client-0.1.4 test/minitest_helper.rb
fixer_client-0.1.3 test/minitest_helper.rb
fixer_client-0.1.2 test/minitest_helper.rb
fixer_client-0.1.1 test/minitest_helper.rb
fixer_client-0.1.0 test/minitest_helper.rb