From 3b7d582e8d4fd2d4de2ec00db006585727f7c4f7 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 7 Jun 2010 18:12:03 -0700 Subject: [PATCH] Removing END blocks --- t/Exception/Shop.t | 5 ----- t/Mail/Send.t | 8 ++------ t/i18n/template.t | 6 +----- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/t/Exception/Shop.t b/t/Exception/Shop.t index 745d0f34e..4fb6fe1e4 100644 --- a/t/Exception/Shop.t +++ b/t/Exception/Shop.t @@ -45,9 +45,4 @@ $e = Exception::Class->caught; isa_ok($e, 'WebGUI::Error'); isa_ok($e, 'WebGUI::Error::Shop::RemoteShippingRate'); -#---------------------------------------------------------------------------- -# Cleanup -END { - -} #vim:ft=perl diff --git a/t/Mail/Send.t b/t/Mail/Send.t index 3e91f7444..ca00fd455 100644 --- a/t/Mail/Send.t +++ b/t/Mail/Send.t @@ -44,6 +44,8 @@ if ( $@ ) { diag( "Can't prepare mail server: $@" ) } plan tests => 17; # Increment this number for each test you create +WebGUI::Test->addToCleanup(SQL => 'delete from mailQueue'); + #---------------------------------------------------------------------------- # Test create $mail = WebGUI::Mail::Send->create( $session ); @@ -353,9 +355,3 @@ cmp_bag( ); # TODO: Test the emailToLog config setting -#---------------------------------------------------------------------------- -# Cleanup -END { - $session->db->write('delete from mailQueue'); -} - diff --git a/t/i18n/template.t b/t/i18n/template.t index efb3b9208..cc5c365c4 100644 --- a/t/i18n/template.t +++ b/t/i18n/template.t @@ -31,6 +31,7 @@ my $session = WebGUI::Test->session; my $lib = WebGUI::Test->lib; ## Remove all macros but International, and set them to call WebGUI::Macro::Callback +WebGUI::Test->originalConfig('macros'); my $originalMacros = $session->config->get('macros'); my $configFileMacros = {}; for my $macro (keys %$originalMacros) { @@ -85,8 +86,3 @@ foreach my $label ( @questionableTemplates ) { sprintf "Empty template: %s, id: %s, url: %s", @{ $label }{qw/title id url/} ); } - -END { - defined $session && - $session->config->set('macros', $originalMacros); -}