Sha256: 69dc4cd9b2c9dd37dc9c27166f44915516f0bd034db5fad7f23af77e2013f20e

Contents?: true

Size: 893 Bytes

Versions: 29

Compression:

Stored size: 893 Bytes

Contents

require 'spec_helper'

FakeWeb.allow_net_connect = true

unless File.exists?(File.join(File.dirname(__FILE__), 'remote.yml'))
  STDERR.puts "\nERROR: Make sure a remote.yml file exists at ./spec/remote/remote.yml\n\n"
  abort
end

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

private

def remote_configuration
  @remote_configuration ||= YAML.load_file(File.expand_path(File.join(File.dirname(__FILE__), 'remote.yml')))
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
chargify_api_ares-1.4.15 spec/remote/remote_helper.rb
chargify_api_ares-1.4.14 spec/remote/remote_helper.rb
chargify_api_ares-1.4.13 spec/remote/remote_helper.rb
chargify_api_ares-1.4.11 spec/remote/remote_helper.rb
chargify_api_ares-1.4.10 spec/remote/remote_helper.rb
chargify_api_ares-1.4.7 spec/remote/remote_helper.rb
chargify_api_ares-1.4.6 spec/remote/remote_helper.rb
chargify_api_ares-1.4.5 spec/remote/remote_helper.rb
chargify_api_ares-1.4.4 spec/remote/remote_helper.rb
chargify_api_ares-1.4.3 spec/remote/remote_helper.rb
chargify_api_ares-1.4.2 spec/remote/remote_helper.rb
chargify_api_ares-1.4.1 spec/remote/remote_helper.rb
chargify_api_ares-1.4.0 spec/remote/remote_helper.rb
chargify_api_ares-1.3.5 spec/remote/remote_helper.rb
chargify_api_ares-1.3.4 spec/remote/remote_helper.rb
chargify_api_ares-1.3.3 spec/remote/remote_helper.rb
chargify_api_ares-1.3.2 spec/remote/remote_helper.rb
chargify_api_ares-1.3.1 spec/remote/remote_helper.rb
chargify_api_ares-1.3.0 spec/remote/remote_helper.rb
chargify_api_ares-1.2.1 spec/remote/remote_helper.rb