Sha256: 8b5cfe3019afd452b7f5cc3318ceb55b3cc9b528f585120dc6cb1f95d263fec5

Contents?: true

Size: 793 Bytes

Versions: 4

Compression:

Stored size: 793 Bytes

Contents

require 'rubygems'
require 'rspec'
$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', '..', 'lib'))

require 'chargify_api_ares'

RSpec.configure do |config|
  config.before(:all) do
    Chargify.configure do |c|
      c.api_key = remote_configuration['api_key']
      c.site = remote_configuration['site']
    end
  end
end

def run_remote_tests?
  remote_configuration['run_tests'] === true
end

def remote_configuration
  @remote_configuration ||= load_remote_configuration_file
end

private

def load_remote_configuration_file
  configuration_file = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'config', 'remote.yml'))
  if File.exist?(configuration_file)
    YAML.load_file(configuration_file)
  else
    {}
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
chargify_api_ares-0.4.4 spec/remote/spec_helper.rb
chargify_api_ares-0.4.3 spec/remote/spec_helper.rb
chargify_api_ares-0.4.2 spec/remote/spec_helper.rb
chargify_api_ares-0.4.1 spec/remote/spec_helper.rb