Program defines class | Test case requires Program for test method
Roman1 => Roman | tc_TestA.rb => Roman1 => testA
Roman2 => Roman | tc_TestB.rb => Roman2 => testB
Roman3 => Roman | tc_TestC.rb => Roman3 => testC
TestRomanNumberGeneration.rb is simply:
tc_TestA generates no test output
./roman3.rb:9 in ‘initialize’
testB is defined in tc_TestB.rb which requires “require ‘roman2’” …
so why does it report an error ostensibly caused by roman3.rb?
One cannot have separate files defining (or redefining?) the same
class, “Roman” in this case.
That seems to be reinforced by diagnostics for testC about redefinition
of constants, which can only occur in this case if it’s including
definitions from another program file.
So the way out is to use three different class names (which is sensible
because I’m testing different versions of the same class). I could
just do that and not bother posting, but I’d like to know that I won’t
wind up masking some other problem if the symptom goes away.
Thanks in Advance,