Sha256: b278535c0894da7e0510adfcb9254e54062cefd929a64f68c1f2bb9acb2cccb3

Contents?: true

Size: 800 Bytes

Versions: 1

Compression:

Stored size: 800 Bytes

Contents

require 'simplecov'
require 'coveralls'

SimpleCov.formatters = [SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter]

SimpleCov.start

require 'cik'
require 'webmock/rspec'

RSpec.configure do |config|
  config.before(:each) do
    stub_request(:get, "http://www.sec.gov/cgi-bin/browse-edgar?CIK=CSCO&action=getcompany").
      with(:headers => {'Accept' => '*/*'}).
      to_return(:status => 200, :body => fixture('csco.html'), :headers => {})
    stub_request(:get, "http://www.sec.gov/cgi-bin/browse-edgar?CIK=ZZZZ&action=getcompany").
      with(:headers => {'Accept' => '*/*'}).
      to_return(:status => 200, :body => "", :headers => {})
  end
end

def fixture_path
  File.expand_path('../fixtures', __FILE__)
end

def fixture(file)
  File.new(fixture_path + '/' + file)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cik-1.0.1 spec/spec_helper.rb