Anti-require?

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.

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

-Chris

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. - [email protected] - http://blog.segment7.net

I LIT YOUR GEM ON FIRE!

On Wed, 06 Dec 2006 01:36:09 -0000, Giles B. [email protected]
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'