# Test::Unit bug?

**URL:** <https://rubytalk.org/t/test-unit-bug/43026>\
**Category:** ruby-talk\
**Created:** [14 December 2007 20:26 UTC](https://rubytalk.org/t/test-unit-bug/43026 "2007-12-14T20:26:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![George\_Malamidis](https://avatars.discourse-cdn.com/v4/letter/g/df788c/32.png) [@George\_Malamidis](https://rubytalk.org/u/George_Malamidis)\
**Post date:** [14 December 2007 20:26 UTC](https://rubytalk.org/t/test-unit-bug/43026/1 "2007-12-14T20:26:47Z")

</div>

Hello,

Not sure if anyone's noticed this before, but there's bug in Test::Unit's unit.rb :

at\_exit do  
&nbsp;&nbsp;&nbsp;unless $! || Test::Unit.run?  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit Test::Unit::AutoRunner.run  
&nbsp;&nbsp;&nbsp;end  
end

Can you spot the bug? You have to do

Test::Unit.run = true

in order to disable the AutoRunner.

George

---

<div class="post-metadata">

**Author:** ![Ryan\_Davis1](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/ryan_davis1/32/1848_2.png) [@Ryan\_Davis1](https://rubytalk.org/u/Ryan_Davis1)\
**Post date:** [14 December 2007 22:26 UTC](https://rubytalk.org/t/test-unit-bug/43026/2 "2007-12-14T22:26:37Z")

</div>

or just don't include 'test/unit'.

> **···**
>
> On Dec 14, 2007, at 12:26 , George Malamidis wrote:
> 
> > Hello,
> > 
> > Not sure if anyone's noticed this before, but there's bug in Test::Unit's unit.rb :
> > 
> > at\_exit do  
> > unless $! || Test::Unit.run?  
> > &nbsp;&nbsp;&nbsp;exit Test::Unit::AutoRunner.run  
> > end  
> > end
> > 
> > Can you spot the bug? You have to do
> > 
> > Test::Unit.run = true
> > 
> > in order to disable the AutoRunner.
