Changeset 1042


Ignore:
Timestamp:
Jun 9, 2007, 2:47:33 PM (14 years ago)
Author:
kake
Message:

Remove dependency on Test::MockObject?.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Build.PL

    r1037 r1042  
    298298        'POSIX'                               => 0,
    299299        'Template'                            => '2.15', # for hash.delete and string.remove vmethods
    300         'Test::MockObject'                    => '0.07', # earlier doesn't use 'mock'
    301300        'Time::Piece'                         => 0,
    302301        'URI::Escape'                         => 0,
  • trunk/Changes

    r1037 r1042  
    99        Added extra "edit this page" link next to the node name; if you don't
    1010          want it, add div#title_edit_link {display:none;} to your stylesheet.
     11        Removed dependency on Test::MockObject.
    1112
    12130.60    13 May 2007
  • trunk/PREREQUISITES

    r1028 r1042  
    4141POSIX
    4242Template
    43 Test::MockObject (version 0.07 or later)
    4443Time::Piece
    4544URI::Escape
  • trunk/t/41_deletion.t

    r785 r1042  
    11use strict;
    2 use Wiki::Toolkit::Formatter::UseMod;
     2use OpenGuides;
    33use OpenGuides::Template;
    44use OpenGuides::Test;
    5 use Test::MockObject;
    65use Test::More tests => 3;
    76
     
    109$config->script_url( "/" );
    1110
    12 # White box testing - we know that OpenGuides::Template only actually uses
    13 # the node_name_to_node_param method of the formatter component of the wiki
    14 # object passed in, and I CBA to faff about with picking out the test DB
    15 # info to make a proper wiki object here.
    16 my $fake_wiki = Test::MockObject->new;
    17 $fake_wiki->mock("formatter",
    18                  sub { return Wiki::Toolkit::Formatter::UseMod->new( munge_urls => 1 ); } );
     11my $guide = OpenGuides->new( config => $config );
     12my $wiki = $guide->wiki;
    1913
    2014my $output = OpenGuides::Template->output(
    21     wiki     => $fake_wiki,
     15    wiki     => $wiki,
    2216    config   => $config,
    2317    template => "node.tt",
     
    2721$config->enable_page_deletion( "y" );
    2822$output = OpenGuides::Template->output(
    29     wiki     => $fake_wiki,
     23    wiki     => $wiki,
    3024    config   => $config,
    3125    template => "node.tt",
     
    3529$config->enable_page_deletion( 1 );
    3630$output = OpenGuides::Template->output(
    37     wiki     => $fake_wiki,
     31    wiki     => $wiki,
    3832    config   => $config,
    3933    template => "node.tt",
Note: See TracChangeset for help on using the changeset viewer.