Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add easy ways to turn on event storage #315

Closed
schwern opened this issue May 26, 2012 · 1 comment
Closed

Add easy ways to turn on event storage #315

schwern opened this issue May 26, 2012 · 1 comment

Comments

@schwern
Copy link
Contributor

schwern commented May 26, 2012

#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.

@schwern
Copy link
Contributor Author

schwern commented May 3, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant