update dependency to Ruby 2.5+
[unicorn.git] / t / oob_gc_path.ru
blob7f40601dd69bda096c6d3f1617e1f6e7f63cd4eb
1 #\-E none
2 require 'unicorn/oob_gc'
3 use Rack::ContentLength
4 use Rack::ContentType, "text/plain"
5 use Unicorn::OobGC, 5, /BAD/
6 $gc_started = false
8 # Mock GC.start
9 def GC.start
10   $gc_started = true
11 end
12 run lambda { |env|
13   if "/gc_reset" == env["PATH_INFO"] && "POST" == env["REQUEST_METHOD"]
14     $gc_started = false
15   end
16   [ 200, {}, [ "#$gc_started\n" ] ]