# Anti-require?

**URL:** <https://www.ruby-forum.com/t/anti-require/78479>\
**Category:** Ruby\
**Created:** [December 6, 2006, 2:37am UTC](https://www.ruby-forum.com/t/anti-require/78479 "2006-12-06T02:37:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Giles\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/848f3c/32.png) [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Post date:** [December 6, 2006, 2:37am UTC](https://www.ruby-forum.com/t/anti-require/78479/1 "2006-12-06T02:37:28Z")

</div>

Is there something like “unrequire”? test/unit is being loaded by a  
slightly spaghetti Rails app and I want to eliminate that. It’s giving  
me a “0 test, 0 assertions” footer on every page load in dev and  
driving me nuts. The problem doesn’t exist in production, just  
somewhere in dev, and I don’t have time to fix it right away.

---

<div class="post-metadata">

**Author:** ![Giles\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/848f3c/32.png) [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Post date:** [December 6, 2006, 3:01am UTC](https://www.ruby-forum.com/t/anti-require/78479/2 "2006-12-06T03:01:32Z")

</div>

Grep? figure out where it’s being loaded and remove it.

-Chris

---

<div class="post-metadata">

**Author:** ![Giles\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/848f3c/32.png) [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Post date:** [December 6, 2006, 3:09am UTC](https://www.ruby-forum.com/t/anti-require/78479/3 "2006-12-06T03:09:33Z")

</div>

On Dec 5, 2006, at 17:36 , Giles B. wrote:

> Is there something like “unrequire”? test/unit is being loaded by a  
> slightly spaghetti Rails app and I want to eliminate that. It’s giving  
> me a “0 test, 0 assertions” footer on every page load in dev and  
> driving me nuts. The problem doesn’t exist in production, just  
> somewhere in dev, and I don’t have time to fix it right away.

There’s a few places in Rails where they mean to require ‘test/unit/  
assertions’ (or some other file) but instead require ‘test/unit’.  
Switch the offending lines and you should be good.

–  
Eric H. - removed\_email\_address@domain.invalid - [http://blog.segment7.net](http://blog.segment7.net)

I LIT YOUR GEM ON FIRE!

---

<div class="post-metadata">

**Author:** ![Giles\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/848f3c/32.png) [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Post date:** [December 6, 2006, 3:41am UTC](https://www.ruby-forum.com/t/anti-require/78479/4 "2006-12-06T03:41:37Z")

</div>

On Wed, 06 Dec 2006 01:36:09 -0000, Giles B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Is there something like “unrequire”? test/unit is being loaded by a  
> slightly spaghetti Rails app and I want to eliminate that. It’s giving  
> me a “0 test, 0 assertions” footer on every page load in dev and  
> driving me nuts. The problem doesn’t exist in production, just  
> somewhere in dev, and I don’t have time to fix it right away.

A quick hack that might work, until you get chance to fix it properly.  
Do  
this somewhere early on:

```
$" << 'test/unit.rb'

```
