File: simplecov_setup.rb

package info (click to toggle)
cucumber 2.4.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,076 kB
  • sloc: ruby: 17,016; javascript: 4,641; makefile: 12; sh: 10; tcl: 3
file content (18 lines) | stat: -rw-r--r-- 481 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
if ENV['SIMPLECOV']
  begin
    # Suppress warnings in order not to pollute stdout which tests expectations rely on
    $VERBOSE = nil if defined?(JRUBY_VERSION)

    require 'simplecov'

    SimpleCov.root(File.expand_path(File.dirname(__FILE__) + '/..'))
    SimpleCov.start do
      add_filter 'iso-8859-1_steps.rb'
      add_filter '.-ruby-core/'
      add_filter '/spec/'
      add_filter '/features/'
    end
  rescue LoadError
    warn("Unable to load simplecov")
  end
end