From 4ac37757ca53e0518038f8e72a49e46bd773e9f1 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 3 Feb 2009 04:09:01 +0000 Subject: [PATCH] Fix a leaking test. --- t/Shop/ShipDriver/FlatRate.t | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/Shop/ShipDriver/FlatRate.t b/t/Shop/ShipDriver/FlatRate.t index 05625251c..36c557d32 100644 --- a/t/Shop/ShipDriver/FlatRate.t +++ b/t/Shop/ShipDriver/FlatRate.t @@ -126,7 +126,7 @@ cmp_deeply( # ####################################################################### -my $driver; +$driver; my $options = { label => 'flat rate, ship weight, items in the cart', @@ -320,13 +320,13 @@ is($driver->calculate($cart), 30_200, 'calculate by percentage of price'); #---------------------------------------------------------------------------- # Cleanup END { - if (defined $driver and ref $driver eq 'WebGUI::Shop::ShipDriver::FlatRate') { + if (defined $driver && ref $driver eq 'WebGUI::Shop::ShipDriver::FlatRate') { $driver->delete; } - if (defined $cart and ref $cart eq 'WebGUI::Shop::Cart') { + if (defined $cart && ref $cart eq 'WebGUI::Shop::Cart') { $cart->delete; } - if (defined $car and (ref($car) eq 'WebGUI::Asset::Sku::Product')) { + if (defined $car && (ref($car) eq 'WebGUI::Asset::Sku::Product')) { $car->purge; } }