Sha256: 18b46683617ca95d746bcf8841fc1dbc708022e460697d0fe7a693955c2f1282

Contents?: true

Size: 1.33 KB

Versions: 1

Compression:

Stored size: 1.33 KB

Contents

require 'simplecov'
SimpleCov.start

require 'coveralls'
Coveralls.wear!


require 'cik'
require 'webmock/rspec'

# This file was generated by the `rspec --init` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# Require this file using `require "spec_helper"` to ensure that it is only
# loaded once.
#
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
RSpec.configure do |config|
  config.run_all_when_everything_filtered = true
  config.filter_run :focus

  # Run specs in random order to surface order dependencies. If you find an
  # order dependency and want to debug it, you can fix the order by providing
  # the seed, which is printed after each run.
  #     --seed 1234
  config.order = 'random'

  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.0 spec/spec_helper.rb