[Ruby] Weird Rails Class Inheritance Bug
Geoffrey Grosenbach
boss at topfunky.com
Mon Jul 17 15:55:45 PDT 2006
http://pastie.caboo.se/4990
I wrote a class method that loads all my fixtures at once, and it
works well for test classes that inherit straight from
Test::Unit::TestCase.
But classes that inherit from sub-classes of T::U::TC lose the
special instance methods created by Rails: users(:bob).id, etc..
Is this a bug in my understanding of class inheritance, or is Rails
doing weird things when it loads fixtures? It seems that my
subclasses should get all the instance methods that are added to
Test::Unit::TestCase.
Geoff
More information about the Ruby
mailing list