Commit | Line | Data |
d3f19ee8 |
1 | use strict; |
2 | use warnings; |
3 | use Test::More; |
4 | |
5 | use FindBin; |
6 | use lib "$FindBin::Bin/lib"; |
7 | |
8 | plan tests => 3; |
9 | |
10 | use_ok('Catalyst::View::TT'); |
11 | use_ok('Catalyst::Test', 'TestApp'); |
12 | |
13 | my $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 | |
27 | ok(!defined $copy, 'Copy went out of scope'); |
28 | |