spec/spec_helper.rb in omniauth-multipassword-0.4.2 vs spec/spec_helper.rb in omniauth-multipassword-2.0.0.rc1

- old
+ new

@@ -1,30 +1,25 @@ +# frozen_string_literal: true + require 'rspec' require 'simplecov' -if ENV['CI'] || (defined?(:RUBY_ENGINE) && RUBY_ENGINE != 'rbx') - begin - require 'codeclimate-test-reporter' - CodeClimate::TestReporter.start - rescue LoadError - end - SimpleCov.start +if ENV['CI'] + require 'codecov' + SimpleCov.formatter = SimpleCov::Formatter::Codecov end -require 'omniauth-multipassword' - -Dir[File.expand_path('spec/support/**/*.rb')].each {|f| require f } - -# Disable omniauth logger -class NullLogger < Logger - def initialize(*args) - end - - def add(*args, &block) - end +SimpleCov.start do + add_filter 'spec' end -OmniAuth.config.logger = NullLogger.new +require 'omniauth-multipassword' +Dir[File.expand_path('spec/support/**/*.rb')].sort.each {|f| require f } + RSpec.configure do |config| config.order = 'random' + + config.before do + OmniAuth.config.logger = Logger.new(IO::NULL) + end end