Create a NoHistory object rather than $history->should_keep_history #46

schwern opened this Issue Aug 28, 2010 · 2 comments


None yet
2 participants

schwern commented Aug 28, 2010

Rather than have a flag saying whether to keep history or not, have a subclass of History that does not store individual results.

It can keep summary information as long as that summary consumes O(1) memory. is_passing(), for example, and perhaps a summary of the number of tests which passed, failed, seen, etc...

It will throw an exception if you ask for information it does not have, like results() and summary().

For bonus points, allow a NoHistory object to be generated from a History object. That would summarize and store the current historical state for continuity.

notbenh commented Sep 14, 2010

NoHistory Object

HistoryStack now has a consume method that will take a list of history objects (currently only HistoryStack's) and replay the history in the consuming object.

So to 'strip' history would look something like:

my $no_history = Test::Builder2::NoHistoryStack->create->consume($history);


schwern commented Oct 7, 2010

Solved by Test::Builder2::NoHistory.

This issue was closed.

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