Displaying 1 result from an estimated 1 matches for "managertest".
2006 Mar 18
0
unit tests for sub-classes
...I
thought I''d try again.
when you create a subclass of Test::Unit::TestCase, e.g. PersonTest (for
model Person), the tests in that class get run automatically whenever the
file is loaded. so far so good.
Let''s say I then create a Manager class which subclasses Person. I want
ManagerTest to extend PersonTest. However, because of the automatic running
I mentioned previously, if you try to load manager_test.rb, you end up
running both PersonTest and ManagerTest. This may not sound like a big
problem but I have 3 levels of subclasses on about 6 core classes, so you
can imagine how...