Sha256: bbbde9dc6336938fec770a63d91c50aeaa1778d757429f6c90888b6ac23a0656

Contents?: true

Size: 1013 Bytes

Versions: 2

Compression:

Stored size: 1013 Bytes

Contents

require 'rubygems'
require 'rspec'
require 'fakeweb'
require File.dirname(__FILE__) + '/../lib/govkit'

# prevent the use of `` in tests
RSpec.configure do |c|
end

# When running specs in TextMate, provide an rputs method to cleanly print objects into HTML display
# From http://talklikeaduck.denhaven2.com/2009/09/23/rspec-textmate-pro-tip
module Kernel
  if ENV.keys.find {|env_var| env_var.index("TM_")}
    def rputs(*args)
      require 'cgi'
      puts( *["<pre>", args.collect {|a| CGI.escapeHTML(a.to_s)}, "</pre>"])
    end
    def rp(*args)
      require 'cgi'
      puts( *["<pre>", args.collect {|a| CGI.escapeHTML(a.inspect)}, "</pre>"])
    end
  else
    alias_method :rputs, :puts
    alias_method :rp, :p
  end
end

FakeWeb.allow_net_connect = false

FIXTURES_DIR = File.join(File.dirname(__FILE__), 'fixtures')

GovKit.configure do |config|
  config.openstates_apikey = 'YOUR_OPENSTATES_API_KEY'
  config.votesmart_apikey = 'YOUR_VOTESMART_API_KEY'
  config.ftm_apikey = 'YOUR_FTM_API_KEY'
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
govkit-0.7.2 spec/spec_helper.rb
govkit-h-0.7.1.0 spec/spec_helper.rb