Closed schwernbot closed 10 years ago
From: @notbenh Date: Tuesday Sep 14, 2010 at 21:46 GMT Orig: https://github.com/Test-More/test-more/issues/72#issuecomment-407105
If this is a feature that we want to support then I'm going to say that we scrap the idea of the 'all in one event stream' in favor of separate begin/result/end stacks. I'm all for having a method that returns all three in order but if there all the same stack then we can't just simply push $old -> $new.
Also do you think that there will be cases where you want to overwrite history? If so then would it make more sense to do this at the 'singleton' idea where you just swap out objects, not the content of those objects?
From: @schwern Date: Thursday Oct 07, 2010 at 19:44 GMT Orig: https://github.com/Test-More/test-more/issues/72#issuecomment-454733
Solved by TB2::History->consume
From: @schwern Date: Tuesday Sep 14, 2010 at 01:08 GMT Orig: https://github.com/Test-More/test-more/issues/72
This is a convenience constructor feeding all the events of one History object into a new one.
The above is roughly equivalent to:
Plus events once that comes in. All the primary information stored in $old_history is fed into $history. None of the derived information is.
The use case is when you want to replace the existing history object with one that acts differently but want to preserve history.