Class: Test::Unit::AutoRunner::GCStressListener

Inherits:
Object
  • Object
show all
Defined in:
lib/test/unit/autorunner.rb

Instance Method Summary collapse

Instance Method Details

#attach_to_mediator(mediator) ⇒ Object



611
612
613
614
615
616
617
618
619
620
621
# File 'lib/test/unit/autorunner.rb', line 611

def attach_to_mediator(mediator)
  mediator.add_listener(TestCase::STARTED) do |test|
    GC.start
    GC.stress = true
  end

  mediator.add_listener(TestCase::FINISHED) do |test|
    GC.start
    GC.stress = false
  end
end