From 7fbb23dc5a209bbcc758df812e2d826425d4617b Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Wed, 22 Sep 2010 11:46:31 -0700 Subject: [PATCH] Fix strange module loading problem which doesn't happen in 7.x --- t/Content/Asset.t | 2 +- t/Content/Wizard.t | 22 ++++++++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/t/Content/Asset.t b/t/Content/Asset.t index 91b724ce1..354b7dae8 100644 --- a/t/Content/Asset.t +++ b/t/Content/Asset.t @@ -90,7 +90,7 @@ WebGUI::Test->addToCleanup( WebGUI::VersionTag->getWorking( $session ) ); #---------------------------------------------------------------------------- # Tests -plan tests => 22; # Increment this number for each test you create +plan tests => 25; # Increment this number for each test you create #---------------------------------------------------------------------------- # test getUrlPermutation( url ) method diff --git a/t/Content/Wizard.t b/t/Content/Wizard.t index 57e7a0e7b..242c37e69 100644 --- a/t/Content/Wizard.t +++ b/t/Content/Wizard.t @@ -22,10 +22,24 @@ use WebGUI::Session; # Init my $session = WebGUI::Test->session; +BEGIN { + $INC{'WebGUI/Wizard/HelloWorld.pm'} = __FILE__; +} + +package WebGUI::Wizard::HelloWorld; + +use base "WebGUI::Wizard"; + +sub _get_steps { return ["hello"] } +sub www_hello { return "Hello World!\n" } +sub wrapStyle { return $_[1] } + #---------------------------------------------------------------------------- # Tests +package main; + plan tests => 3; # Increment this number for each test you create #---------------------------------------------------------------------------- @@ -41,12 +55,4 @@ $session->request->setup_body( { } ); is( WebGUI::Content::Wizard::handler( $session ), "Hello World!\n", "Accepts request and returns response" ); -package WebGUI::Wizard::HelloWorld; - -use base "WebGUI::Wizard"; - -sub _get_steps { return ["hello"] } -sub www_hello { return "Hello World!\n" } -sub wrapStyle { return $_[1] } - #vim:ft=perl