Sha256: a2c02e550d87be10a734fabe2858ec2764e68d2f8e646a9d844bcad448e8eef0
Contents?: true
Size: 745 Bytes
Versions: 6
Compression:
Stored size: 745 Bytes
Contents
require 'yaml' module CredentialsTestHelpers def credentials credentials_path = Pathname('../../credentials.yml').expand_path(__FILE__) @loaded_credentials ||= if credentials_path.readable? YAML.load_file(credentials_path) || {} else {} end @credentials ||= Hash.new do |h,k| h[k] = "MISSING_CREDENTIAL_KEY_#{k}" unless ENV['TRAVIS'] warn "Missing key #{k.inspect} from #{credentials_path}" end end.merge!(@loaded_credentials) rescue LoadError, SystemCallError, KeyError => e pending e.message end end RSpec.configure do |config| config.include(CredentialsTestHelpers) end
Version data entries
6 entries across 6 versions & 1 rubygems