Sha256: f131206965ddfc5f5c476bd8597082cc45c06e2f171dc6b56b42796635d05254
Contents?: true
Size: 1.04 KB
Versions: 4
Compression:
Stored size: 1.04 KB
Contents
# frozen_string_literal: true # Generate code coverage metrics outside CI. unless ENV["CI"] require "simplecov" SimpleCov.start { add_filter "/spec/" } end require "pry" require "lita/rspec" RSpec.configure do |config| config.mock_with :rspec do |mocks_config| mocks_config.verify_doubled_constant_names = true mocks_config.verify_partial_doubles = true end # Lita calls `exit(false)` in a few places. If an RSpec example hits one of these calls and it # wasn't explicitly stubbed, the example will stop at exactly that point, but will be reported by # RSpec as having passed, and will also change RSpec's exit code to 1. This situation indicates # either a missing stub or a real bug, so we catch it here and fail loudly. # # https://github.com/rspec/rspec-core/issues/2246 config.around do |example| example.run rescue SystemExit => e raise <<~ERROR Unhandled SystemExit! This will cause RSpec to exit 1 but show the example as passing!" Full backtrace: #{e.backtrace.join("\n")} ERROR end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rita-5.0.0.alpha.4 | spec/spec_helper.rb |
rita-5.0.0.alpha.3 | spec/spec_helper.rb |
rita-5.0.0.alpha.2 | spec/spec_helper.rb |
rita-5.0.0.alpha.1 | spec/spec_helper.rb |