Sha256: 0b8d9fa35ce260b73f0e5fbaff03720aa273379ff2ca3edaf0b7f5fe04b3c110

Contents?: true

Size: 984 Bytes

Versions: 54

Compression:

Stored size: 984 Bytes

Contents

require 'minitest/autorun'

module Rack
  class TestCase < Minitest::Test
    # Check for Lighttpd and launch it for tests if available.
    `which lighttpd`

    if $?.success?
      begin
        # Keep this first.
        LIGHTTPD_PID = fork {
          ENV['RACK_ENV'] = 'deployment'
          ENV['RUBYLIB'] = [
            ::File.expand_path('../../lib', __FILE__),
            ENV['RUBYLIB'],
          ].compact.join(':')

          Dir.chdir(::File.expand_path("../cgi", __FILE__)) do
            exec "lighttpd -D -f lighttpd.conf"
          end
        }
      rescue NotImplementedError
        warn "Your Ruby doesn't support Kernel#fork. Skipping Rack::Handler::CGI and ::FastCGI tests."
      else
        Minitest.after_run do
          Process.kill 15, LIGHTTPD_PID
          Process.wait LIGHTTPD_PID
        end
      end
    else
      warn "Lighttpd isn't installed. Skipping Rack::Handler::CGI and FastCGI tests. Install lighttpd to run them."
    end
  end
end

Version data entries

54 entries across 52 versions & 14 rubygems

Version Path
rack-2.0.9.4 test/helper.rb
rack-2.0.9.3 test/helper.rb
rack-2.0.9.2 test/helper.rb
rack-2.0.9.1 test/helper.rb
mountapi-0.11.1 vendor/bundle/ruby/2.7.0/gems/rack-2.0.5/test/helper.rb
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/rack-2.0.8/test/helper.rb
tdiary-5.1.2 vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/test/helper.rb
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/rack-2.0.6/test/helper.rb
tdiary-5.1.1 vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/test/helper.rb
rack-2.0.9 test/helper.rb
grape-extra_validators-1.0.0 vendor/bundle/ruby/2.4.0/gems/rack-2.0.8/test/helper.rb
rack-2.0.8 test/helper.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/rack-2.0.7/test/helper.rb
tdiary-5.1.0 vendor/bundle/gems/rack-2.0.7/test/helper.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/rack-2.0.7/test/helper.rb
chatops-rpc-0.0.2 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/rack-2.0.7/test/helper.rb
chatops-rpc-0.0.1 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/rack-2.0.7/test/helper.rb
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/rack-2.0.7/test/helper.rb
zuora_connect_ui-0.9.0 vendor/ruby/2.6.0/gems/rack-2.0.7/test/helper.rb
zuora_connect_ui-0.8.3 vendor/ruby/2.6.0/gems/rack-2.0.7/test/helper.rb