rack.git  about / heads / tags
a modular Ruby webserver interface
blob a2f569c39a1f83ab75ebd055204164d479397369 801 bytes (raw)
$ git show chunk:test/helper.rb	# shows this blob on the CLI

 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
33
34
35
36
37
38
39
40
41
 
# frozen_string_literal: true

if ENV.delete('COVERAGE')
  require 'simplecov'

  SimpleCov.start do
    enable_coverage :branch
    add_filter "/test/"
    add_filter "/lib/rack/handler"
    add_group('Missing'){|src| src.covered_percent < 100}
    add_group('Covered'){|src| src.covered_percent == 100}
  end
end

if ENV['SEPARATE']
  def self.separate_testing
    yield
  end
else
  $:.unshift(File.expand_path('../lib', __dir__))
  require_relative '../lib/rack'

  def self.separate_testing
  end
end

require 'minitest/global_expectations/autorun'
require 'stringio'

class Minitest::Spec
  def self.deprecated(*args, &block)
    it(*args) do
      begin
        verbose, $VERBOSE = $VERBOSE, nil
        instance_exec(&block)
      ensure
        $VERBOSE = verbose
      end
    end
  end
end

git clone https://yhbt.net/rack.git