Author: kake Date: 2007-06-09 14:47:33 +0100 (Sat, 09 Jun 2007) New Revision: 1042
Modified: trunk/Build.PL trunk/Changes trunk/PREREQUISITES trunk/t/41_deletion.t Log: Remove dependency on Test::MockObject.
Modified: trunk/Build.PL =================================================================== --- trunk/Build.PL 2007-06-09 13:36:35 UTC (rev 1041) +++ trunk/Build.PL 2007-06-09 13:47:33 UTC (rev 1042) @@ -297,7 +297,6 @@ $search_module => 0, 'POSIX' => 0, 'Template' => '2.15', # for hash.delete and string.remove vmethods - 'Test::MockObject' => '0.07', # earlier doesn't use 'mock' 'Time::Piece' => 0, 'URI::Escape' => 0, 'XML::RSS' => 0,
Modified: trunk/Changes =================================================================== --- trunk/Changes 2007-06-09 13:36:35 UTC (rev 1041) +++ trunk/Changes 2007-06-09 13:47:33 UTC (rev 1042) @@ -8,6 +8,7 @@ commit_node method in "perldoc OpenGuides" for details. Added extra "edit this page" link next to the node name; if you don't want it, add div#title_edit_link {display:none;} to your stylesheet. + Removed dependency on Test::MockObject.
0.60 13 May 2007 Removed footer search from edit page (shouldn't have been there).
Modified: trunk/PREREQUISITES =================================================================== --- trunk/PREREQUISITES 2007-06-09 13:36:35 UTC (rev 1041) +++ trunk/PREREQUISITES 2007-06-09 13:47:33 UTC (rev 1042) @@ -40,7 +40,6 @@ Plucene POSIX Template -Test::MockObject (version 0.07 or later) Time::Piece URI::Escape XML::RSS
Modified: trunk/t/41_deletion.t =================================================================== --- trunk/t/41_deletion.t 2007-06-09 13:36:35 UTC (rev 1041) +++ trunk/t/41_deletion.t 2007-06-09 13:47:33 UTC (rev 1042) @@ -1,24 +1,18 @@ use strict; -use Wiki::Toolkit::Formatter::UseMod; +use OpenGuides; use OpenGuides::Template; use OpenGuides::Test; -use Test::MockObject; use Test::More tests => 3;
my $config = OpenGuides::Test->make_basic_config; $config->site_name( "Test Site" ); $config->script_url( "/" );
-# White box testing - we know that OpenGuides::Template only actually uses -# the node_name_to_node_param method of the formatter component of the wiki -# object passed in, and I CBA to faff about with picking out the test DB -# info to make a proper wiki object here. -my $fake_wiki = Test::MockObject->new; -$fake_wiki->mock("formatter", - sub { return Wiki::Toolkit::Formatter::UseMod->new( munge_urls => 1 ); } ); +my $guide = OpenGuides->new( config => $config ); +my $wiki = $guide->wiki;
my $output = OpenGuides::Template->output( - wiki => $fake_wiki, + wiki => $wiki, config => $config, template => "node.tt", ); @@ -26,7 +20,7 @@ "doesn't offer page deletion link by default" ); $config->enable_page_deletion( "y" ); $output = OpenGuides::Template->output( - wiki => $fake_wiki, + wiki => $wiki, config => $config, template => "node.tt", ); @@ -34,7 +28,7 @@ "...but does when enable_page_deletion is set to 'y'" ); $config->enable_page_deletion( 1 ); $output = OpenGuides::Template->output( - wiki => $fake_wiki, + wiki => $wiki, config => $config, template => "node.tt", );