class Test::Unit::AutoRunner::GCStressListener - test-unit: Ruby Standard Library Documentation

# class Test::Unit::AutoRunner::GCStressListener

### Public Instance Methods

attach_to_mediator(mediator) click to toggle source

    # File test-unit-3.6.7/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