# \[ANN\] Test Filtering Extension

**URL:** <https://www.ruby-forum.com/t/ann-test-filtering-extension/116411>\
**Category:** Radiant CMS\
**Created:** [October 5, 2007, 8:20am UTC](https://www.ruby-forum.com/t/ann-test-filtering-extension/116411 "2007-10-05T08:20:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dasch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@dasch](https://www.ruby-forum.com/u/dasch)\
**Post date:** [October 5, 2007, 8:20am UTC](https://www.ruby-forum.com/t/ann-test-filtering-extension/116411/1 "2007-10-05T08:20:54Z")

</div>

The Test Filtering Extension is available from:

[http://soxbox.no-ip.org/radiant/svn/extensions/test\_filtering](http://soxbox.no-ip.org/radiant/svn/extensions/test_filtering)

Unless you’re developing extensions, avert your eyes now.

Basically, it provides a mechanism for extensions to  
explicitely declare which tests they’re going to break.

This allows you to run the core tests with your extension  
installed to make sure you didn’t break anything that  
you didn’t mean to.

For example:

class AdminTreeStructureExtension \< Radiant::Extension  
breaks\_tests ‘Admin::PageControllerTest’,  
%w{test\_index\_\_with\_cookie} if respond\_to?(:breaks\_tests)  
end

Now, with admin\_tree\_structure installed, if I run rake test,  
the test\_index\_\_with\_cookie test gets skipped (in this case  
because my extension changes the way the admin tree will  
render)

(It’s a good idea to make the breaks\_tests calls conditional  
on the existence of the breaks\_tests method so that your  
extension doesn’t have a runtime dependency on this one).

Let the flood of well-tested extensions commence.

Dan.
