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



588
589
590
591
592
593
594
595
596
597
598
# File 'lib/test/unit/autorunner.rb', line 588

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