Sha256: fc89a549afb20d4dc2e0c63c1e75edda6bb5130029ebabaa9a1a777362f9b095

Contents?: true

Size: 987 Bytes

Versions: 4

Compression:

Stored size: 987 Bytes

Contents

$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'rspec'
require 'debugger'
require File.join(File.dirname(__FILE__), '../lib', 'lazy_google_analytics')
require 'stringio'
require "pry"

RSpec.configure do |config|

  def fixture_key(type, filename)
    dir_name = type.to_s + "s"
    File.dirname(__FILE__) + "/fixtures/#{dir_name}/#{filename}"
  end

  def config_options
    config = YAML.load( File.open(fixture_key("config", "account_config.yml")) )
    config["key_file"]  = fixture_key("key", config["pem"])
    return config
  end

  def config_setup
    LazyGoogleAnalytics::Config.setup do |config|
      config.pass_phrase = config_options["pass_phrase"]
      config.key_file    = config_options["key_file"]
      config.client_id   = config_options["client_id"]
      config.scope       = config_options["scope"]
      config.profile_id  = config_options["profile_id"]
      config.email       =  config_options["email"]
    end
    LazyGoogleAnalytics::Config
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
lazy_google_analytics-0.1.6 spec/spec_helper.rb
lazy_google_analytics-0.1.5 spec/spec_helper.rb
lazy_google_analytics-0.1.2 spec/spec_helper.rb
lazy_google_analytics-0.1.0 spec/spec_helper.rb