Test-More / TB2

Test::Builder version 2, the next generation of building testing modules in Perl
Other
1 stars 0 forks source link

Add easy ways to turn on event storage #208

Closed schwernbot closed 10 years ago

schwernbot commented 10 years ago

From: @schwern Date: Saturday May 26, 2012 at 05:16 GMT Orig: https://github.com/Test-More/test-more/issues/315

198 made Test::Builder stop storing events by default to conserve memory. Right now it's a PITA to turn event storage on.

use Test::Builder;
use TB2::History;

my $Test = Test::Builder->new;
my $history = TB2::History->new( store_events => 1 );
$Test->test_state->ec->history($history);

Make it convenient to turn them back on again both in Test::Builder::Module and Test::Builder.

use Test::More store_events => 1;

Test::Builder->new( store_events => 1 );

Keep in mind that event storage must be turned on before any tests or events (ie. the plan) is run.

schwernbot commented 10 years ago

From: @schwern Date: Friday May 03, 2013 at 22:47 GMT Orig: https://github.com/Test-More/test-more/issues/315#issuecomment-17422319

c3ee922320de0fe24dbf463103915dce044f6387 adds the ability to turn storage on in import and via Test::Builder directly. That should do it.