File: spec_helper.rb

package info (click to toggle)
ruby-addressable 2.8.7-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 712 kB
  • sloc: ruby: 9,421; makefile: 11
file content (32 lines) | stat: -rw-r--r-- 628 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# frozen_string_literal: true

require 'rspec/its'

begin
  require 'coveralls'
  Coveralls.wear! do
    add_filter "spec/"
    add_filter "vendor/"
  end
rescue LoadError
  warn "warning: coveralls gem not found; skipping Coveralls"
  require 'simplecov'
  SimpleCov.start do
    add_filter "spec/"
    add_filter "vendor/"
  end
end if Gem.loaded_specs.key?("simplecov")

class TestHelper
  def self.native_supported?
    mri = RUBY_ENGINE == "ruby"
    windows = RUBY_PLATFORM.include?("mingw")

    mri && !windows
  end
end

RSpec.configure do |config|
  config.warnings = true
  config.filter_run_when_matching :focus
end