fix Test::More prereq for done_testing
[catagits/Catalyst-View-TT.git] / t / 08cycle.t
CommitLineData
d3f19ee8 1use strict;
2use warnings;
3use Test::More;
4
5use FindBin;
6use lib "$FindBin::Bin/lib";
7
8plan tests => 3;
9
10use_ok('Catalyst::View::TT');
11use_ok('Catalyst::Test', 'TestApp');
12
13my $copy;
14{
15 my $view = new Catalyst::View::TT("TestApp", {});
16
17 # Can't Test::Memory::Cycle test since it doesn't detect
18 # [ sub { $copy->paths } ]
19 # as a cycle, but the above does prevent it getting garbage collected.
20 #
21 # memory_cycle_ok($view, 'No cycles in View');
22
23 $copy = $view;
24 Scalar::Util::weaken($copy);
25}
26
27ok(!defined $copy, 'Copy went out of scope');
28