spec/spec_helper.rb in fortnox-api-0.0.2 vs spec/spec_helper.rb in fortnox-api-0.1.0
- old
+ new
@@ -1,19 +1,31 @@
ENV['RUBY_ENV'] = 'test'
-require 'fortnox/api'
require 'webmock/rspec'
require 'pry'
+require "codeclimate-test-reporter"
+require 'support/matchers'
+require 'support/helpers'
+require 'support/vcr_setup'
+CodeClimate::TestReporter.start
+
RSpec.configure do |config|
config.run_all_when_everything_filtered = true
config.filter_run :focus
+ config.extend Helpers
+
# 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'
-end
-# Force disable the dotenv gem
-ENV = {}
+ WebMock.disable_net_connect!( allow: 'codeclimate.com' )
+
+ config.after( :each ) do
+ ENV['FORTNOX_API_BASE_URL'] = nil
+ ENV['FORTNOX_API_CLIENT_SECRET'] = nil
+ ENV['FORTNOX_API_ACCESS_TOKEN'] = nil
+ end
+end