Re: preforking prove
[email protected] (Jonathan Swartz)
| Newsgroups | perl.qa |
|---|---|
| Message-ID | <[email protected]> |
On Nov 8, 2012, at 7:17 AM, Mark Stosberg <[email protected]> wrote: >> I wasn't able to get forkprove to work with Test::Class, because of > Test::Class's insistence that tests be declared at compile time. >> >> swartz> cat t/Sanity.t >> #!/usr/bin/perl >> use CHI::t::Sanity; >> CHI::t::Sanity->runtests; >> >> swartz> forkprove t/Sanity.t >> t/Sanity.t .. Test::Class was loaded too late (after the CHECK block was run). See 'A NOTE ON LOADING TEST CLASSES' in perldoc Test::Class for more details >> t/Sanity.t .. No subtests run >> >> Mark, you mentioned before that you use Test::Class before - did you use it in conjunction with forkprove? > > Jonathan, > > It "just worked" for me, using the documented forkprove syntax of > loading modules with "-M". > > I ran it on a directory that primarily contained test class files. Each > one followed this general design: > > ### > > package Project::Test::Foo; > use parent 'Test::Class'; > > # my tests here... > > Test::Class->runtests; > > ### > > Mark > Ok - and what did you pass to -M?