I use Sunit + Phexample in my project. The model uses a dynamic variable. In 
order to ease the writing of tests I implemented in my TestCase

IAMModelTests>>#runCase

        self createContext do: [  super runCase ]

with

IAMContext>>#do: aBlock
        ^ IAMCurrentContext
                value: self
                during:  aBlock

It works basically. The method #runCase is only execute once. The #given: calls 
inside a test method do not trigger further runCase executions. The strange 
thing is that all tests succeed when I run them alone e.g. in Nautilus. 
Whenever I run the tests via the testrunner 2 tests fail.  Those 2 tests are 
not any more special than the other tests. And they fail reliably. 

Does anyone has a hint what is different when being run in testrunner. I cannot 
debug the problem easily because then I would run the test alone and it will 
succeed.

thanks,

Norbert


Reply via email to