Created
September 24, 2009 04:14
-
-
Save perlDreamer/192512 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 62d4e7ed3baa52ae505cba007dc841c6b4f9a927 | |
Author: Colin Kuskie <colink@perldreamer.com> | |
Date: Wed Sep 23 21:09:38 2009 -0700 | |
Bad hack to make testing work again. Need some cleaner way to init the module. | |
diff --git a/t/lib/WebGUI/Test.pm b/t/lib/WebGUI/Test.pm | |
index 092ab63..8f54a57 100644 | |
--- a/t/lib/WebGUI/Test.pm | |
+++ b/t/lib/WebGUI/Test.pm | |
@@ -59,13 +59,10 @@ use JSON qw( from_json to_json ); | |
use Scope::Guard; | |
use WebGUI::PseudoRequest; | |
-use WebGUI::Session; | |
our @EXPORT = qw(cleanupGuard); | |
our @EXPORT_OK = qw(session config); | |
-my $CLASS = __PACKAGE__; | |
- | |
my %originalConfig; | |
my @guarded; | |
@@ -73,14 +70,10 @@ my @guarded; | |
my $smtpdPid; | |
my $smtpdStream; | |
my $smtpdSelect; | |
+our $CLASS = __PACKAGE__; | |
-$CLASS->init; | |
- | |
-our $SESSION = WebGUI::Test->newSession(1); | |
- | |
-my $originalSetting = clone $SESSION->setting->get; | |
+BEGIN { | |
-sub init { | |
our $CONFIG_FILE = $ENV{ WEBGUI_CONFIG }; | |
die "Enviroment variable WEBGUI_CONFIG must be set to the full path to a WebGUI config file.\n" | |
@@ -117,7 +110,13 @@ sub init { | |
} | |
close $PRELOAD; | |
} | |
+ | |
} | |
+use WebGUI::Session; | |
+ | |
+our $SESSION = WebGUI::Test->newSession(1); | |
+ | |
+my $originalSetting = clone $SESSION->setting->get; | |
END { | |
my $Test = $CLASS->builder; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment