Thread

Posted on Wed Oct 17 21:16:28 2007 by ilial
startup method is run at the end
I'm seeing a startup method get run twice. Once at the beginning, as expected. And once at the end, not expected. Anybody else seeing this? I'm using Test::Class 0.24
Direct Responses: 6281 | Write a response
Posted on Wed Oct 17 22:26:06 2007 by adrianh in response to 6280
Re: startup method is run at the end

Hi,

Not seen this myself :-) Can you reproduce the problem with a (hopefully small) code example?

Adrian

Direct Responses: 6283 | Write a response
Posted on Thu Oct 18 05:29:16 2007 by ilial in response to 6281
Re: startup method is run at the end
My fault.

I was inheriting the startup method and then running Test::Class->runtests, which ran the tests from the base class and the subclass separately.
ie. Foo inherits from Bar which inherits from Test::Class

Using "Foo->runtests" fixes the problem.
Direct Responses: 6284 | Write a response
Posted on Thu Oct 18 11:09:30 2007 by adrianh in response to 6283
Re: startup method is run at the end
Ah. If you have an abstract test class that you don't want to be run automagically by Test::Class runtests you can use SKIP_CLASS - see the docs for details.
Write a response