spec/spec_helper.rb in cik-1.0.0 vs spec/spec_helper.rb in cik-1.0.1
- old
+ new
@@ -1,44 +1,28 @@
require 'simplecov'
-SimpleCov.start
-
require 'coveralls'
-Coveralls.wear!
+SimpleCov.formatters = [SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter]
+SimpleCov.start
+
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
+end
\ No newline at end of file