spec/spec_helper.rb in rambling-trie-2.3.1 vs spec/spec_helper.rb in rambling-trie-2.4.0
- old
+ new
@@ -1,23 +1,23 @@
# frozen_string_literal: true
require 'yaml'
require 'simplecov'
+COVERAGE_FILTER = %r{/spec/}.freeze
+
if ENV.key? 'COVERALLS_REPO_TOKEN'
require 'coveralls'
SimpleCov.formatters = [
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter,
]
- Coveralls.wear! do
- add_filter '/spec/'
- end
+ Coveralls.wear! { add_filter COVERAGE_FILTER }
else
- SimpleCov.start
+ SimpleCov.start { add_filter COVERAGE_FILTER }
end
require 'rspec'
require 'rambling-trie'
::SPEC_ROOT = File.dirname __FILE__
@@ -25,10 +25,10 @@
RSpec.configure do |config|
config.color = true
config.tty = true
config.formatter = :documentation
config.order = :random
- config.run_all_when_everything_filtered = true
+ config.filter_run_when_matching :focus
config.raise_errors_for_deprecations!
end
require 'support/config'