Forum: Ruby on Rails Something crazy with rake test

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bob M. (Guest)
on 2009-03-13 12:56
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 ?
Bob M. (Guest)
on 2009-03-13 15:16
This is a bug.

Described here
http://rails.lighthouseapp.com/projects/8994/ticke...

The generated test_helper.rb file is faulty

Solution is to
require 'test/unit' at the top of test_helper.rb
This topic is locked and can not be replied to.