Catalyst-View-TT

 view release on metacpan or  search on metacpan

t/08cycle.t  view on Meta::CPAN

use strict;
use warnings;
use Test::More;

use FindBin;
use lib "$FindBin::Bin/lib";

plan tests => 3;

use_ok('Catalyst::View::TT');
use_ok('Catalyst::Test', 'TestApp');

my $copy;
{
    my $view = new Catalyst::View::TT("TestApp", {});

    # Can't Test::Memory::Cycle test since it doesn't detect 
    #  [ sub { $copy->paths } ]
    # as a cycle, but the above does prevent it getting garbage collected.
    #
    # memory_cycle_ok($view, 'No cycles in View');

    $copy = $view;
    Scalar::Util::weaken($copy);
}

ok(!defined $copy, 'Copy went out of scope');



( run in 0.798 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )