8 plan skip_all => 'These tests are only for Test::Builder 1.005+'
9 if Test::Builder->VERSION < 1.005;
26 use TB2::History; # FIXME - this should not need to be loaded here explicitly
29 my $capture = capture {
30 $ret1 = with_immutable {
31 ok(Foo->meta->is_mutable, 'is mutable');
34 $ret2 = with_immutable {
35 ok(Bar->meta->find_method_by_name('new'), 'can find "new" method');
39 my $results = $capture->results;
43 'first test runs while Foo is mutable' => { name => 'is mutable',
48 'first test runs while Foo is immutable' => { name => 'is mutable',
53 'can find "new" while Bar is mutable' => { name => 'can find "new" method',
58 'can find "new" while Bar is immutable' => { name => 'can find "new" method',
64 result_like(shift(@$results), $_->[1], $_->[0]) foreach @tests;
66 ok(!$ret1, 'one of the is_immutable tests failed');
67 ok($ret2, 'the find_method_by_name tests passed');