# Something crazy with rake test

**URL:** <https://www.ruby-forum.com/t/something-crazy-with-rake-test/162749>\
**Category:** Rails\
**Created:** [March 13, 2009, 11:56am UTC](https://www.ruby-forum.com/t/something-crazy-with-rake-test/162749 "2009-03-13T11:56:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/9fc348/32.png) [@bobm](https://www.ruby-forum.com/u/bobm)\
**Post date:** [March 13, 2009, 11:56am UTC](https://www.ruby-forum.com/t/something-crazy-with-rake-test/162749/1 "2009-03-13T11:56:54Z")

</div>

Rake plugin tests are not run anymore (rake 0.8.4 or 0.8.3) !

rails foo  
cd foo  
script/generate plugin bar  
cd vendor/plugins/bar  
rake test

No test is run, no output of the usual number of assertions, number of  
tests…

rake output is  
(in /usr/local/www/foo/vendor/plugins/bar)  
/usr/bin/ruby -I"/usr/local/www/foo/vendor/plugins/bar/lib"  
-I"/usr/local/www/foo/vendor/plugins/bar/lib"  
-I"/usr/local/www/foo/vendor/plugins/bar/test"  
“/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/rake\_test\_loader.rb”  
“test/bar\_test.rb”

editing test\_bar.rb and modifying the default “truth” assertion with  
assert false does not produces any assertion failure since the tests are  
not run at all

It worked yesterday and I only upgraded to rake 0.8.4 then reverted to  
0.8.3

Any idea ?

---

<div class="post-metadata">

**Author:** ![bobm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/9fc348/32.png) [@bobm](https://www.ruby-forum.com/u/bobm)\
**Post date:** [March 13, 2009, 2:16pm UTC](https://www.ruby-forum.com/t/something-crazy-with-rake-test/162749/2 "2009-03-13T14:16:31Z")

</div>

This is a bug.

Described here  
[http://rails.lighthouseapp.com/projects/8994/tickets/1878-a-generated-plugins-tests-are-not-run-by-rake-test](http://rails.lighthouseapp.com/projects/8994/tickets/1878-a-generated-plugins-tests-are-not-run-by-rake-test)

The generated test\_helper.rb file is faulty

Solution is to  
require ‘test/unit’ at the top of test\_helper.rb
