Permalink
Browse files

Remove TB2::NoHistory, it is unmaintained and has no future.

TB2::History will take over this role eventually (see #198).  Meanwhile, there's no
point in letting people rely on a half implementation that's going to be deleted.

For #241
  • Loading branch information...
1 parent 27c6633 commit 2e260356be4d2d3ecb5f2975f932f618238b9d71 @schwern schwern committed Nov 29, 2011
Showing with 7 additions and 117 deletions.
  1. +7 −0 Changes
  2. +0 −2 MANIFEST
  3. +0 −62 lib/TB2/NoHistory.pm
  4. +0 −53 t/History/NoHistory.t
View
@@ -1,5 +1,12 @@
See README and version control log for Test::Builder2 changes.
+1.005000_003
+ Incompatible changes (with the last alpha)
+ * TB2::NoHistory has been deleted before somebody relies on it.
+ It was unmaintained and will be replaced by a TB2::History feature.
+ See github 198. [github 241]
+
+
1.005000_002 Mon Nov 28 21:16:13 PST 2011
This release is now 100% feature complete and supports all documented
features of Test::Builder 0.98. From this point forward it's bug
View
@@ -40,7 +40,6 @@ lib/TB2/HasDefault.pm
lib/TB2/History.pm
lib/TB2/Module.pm
lib/TB2/Mouse.pm
-lib/TB2/NoHistory.pm
lib/TB2/OnlyOnePlan.pm
lib/TB2/Result.pm
lib/TB2/Result/Base.pm
@@ -195,7 +194,6 @@ t/History/child_process.t
t/History/History.t
t/History/HistoryStats.t
t/History/in_test.t
-t/History/NoHistory.t
t/History/plan.t
t/History/test_was_successful.t
t/import.t
View
@@ -1,62 +0,0 @@
-package TB2::NoHistory;
-
-use Carp;
-use TB2::Mouse;
-extends qw{TB2::History};
-
-our $VERSION = '1.005000_002';
-$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
-
-
-=head1 NAME
-
-TB2::NoHistory - Store no history, just keep stats
-
-=head1 SYNOPSIS
-
- use TB2::NoHistory;
-
- # This is a shared default object
- my $history = TB2::NoHistory->default;
- my $ec = TB2::EventCoordinator->create(
- history => $history
- );
-
- my $result = TB2::Result->new_result( pass => 1 );
- $ec->post_event($result);
-
- $history->can_succeed; # true
- $history->test_count; # 1 we've seen a test
- $history->results_count; # 0 we did not store a result
- $history->results; # [] still not there
-
-=head1 DESCRIPTION
-
-This object does not store results but manages the history of test stats.
-
-=head1 API
-
-All methods are the same from TB2::History.
-
-=cut
-
-has '+results' =>
- lazy => 1,
- clearer => 'clear_results',
-;
-
-
-sub handle_result {
- my $self = shift;
- my $result = shift;
-
- $self->_update_statistics($result);
-
- return;
-}
-
-sub handle_event {}
-
-no TB2::Mouse;
-1;
-
View
@@ -1,53 +0,0 @@
-#!/usr/bin/perl -w
-
-use strict;
-use warnings;
-
-use lib 't/lib';
-
-BEGIN { require 't/test.pl' }
-use MyEventCoordinator;
-use TB2::Result;
-
-require_ok 'TB2::NoHistory';
-can_ok( 'TB2::NoHistory',
- qw{ new
- results
- has_results
- handle_result
- result_count
- },
-);
-
-# helpers
-sub new_history { TB2::NoHistory->new }
-sub Pass { TB2::Result->new_result( pass => 1 ) }
-sub Fail { TB2::Result->new_result( pass => 0 ) }
-
-
-{
- ok my $history = new_history, q{new history} ;
- my $ec = MyEventCoordinator->new( history => $history );
-
- ok!$history->has_results, q{we no not yet have results};
- is_deeply $history->results, [], q{blank results set};
-
- $ec->post_event( Pass() );
- $ec->post_event( Fail() );
- $ec->post_event($_) for Pass(), Fail();
-
- ok!$history->has_results, q{we have no results};
-
- is $history->result_count, 0, q{result count is 0 as we don't store them};
- is $history->test_count, 4, q{test_count how ever does work};
-
- is $history->pass_count, 2, q{pass_count};
- is $history->fail_count, 2, q{fail_count};
- is $history->todo_count, 0, q{todo_count};
- is $history->skip_count, 0, q{skip_count};
-
- is_deeply $history->results, [], q{no results stored};
-
-}
-
-done_testing;

0 comments on commit 2e26035

Please sign in to comment.