Forum: Ruby on Rails Test is not a module (TypeError)

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.
Kent Howard (Guest)
on 2005-12-09 01:29
Hi,

We have a project with a db table 'test' and a corresponding model Test.
When we run rake to invoke our tests, rake fails with the following
error:
/usr/lib/ruby/1.8/test/unit/assertionfailederror.rb:5: Test is not a
module (TypeError)

We believe this is caused by some namespace conflict between our model
named Test and rake's own internals. If we rename our Test class, this
problem disappears; however, Test really is the right name in this
circumstance.

Can anyone suggest a possible method to resolve this issue? This can be
recreated by taking any rails project and creating a model called Test.
Attempting to run rake will yield the error above.

-Kent
baoliang z. (Guest)
on 2011-10-03 07:35
I get a same problem .
This topic is locked and can not be replied to.