X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=t%2F1.t;h=ff8ae7347db6a2b5f7a7e566147f96803dde4f69;hb=feefb416b3c1aafdea07aa47378d007ee760e9f9;hp=bb56b7ab4c1bc9e149c782dfe67df593359b140d;hpb=1b3ec28e5f2b7f6f5f4c8140a98e114912271a53;p=maypole.git diff --git a/t/1.t b/t/1.t index bb56b7a..ff8ae73 100644 --- a/t/1.t +++ b/t/1.t @@ -1,17 +1,23 @@ -# Before `make install' is performed this script should be runnable with -# `make test'. After `make install' it should work as `perl 1.t' +# vim:ft=perl +use Test::More 'no_plan'; -######################### +package Fake::Loader; -# change 'tests => 1' to 'tests => last_test_to_print'; +package Fake::MVC; +use base 'Apache::MVC'; -use Test; -BEGIN { plan tests => 1 }; -use Apache::MVC; -ok(1); # If we made it this far, we're ok. +sub set_database { + my $self = shift; + $self->config->{loader} = bless {}, Fake::Loader; +} -######################### - -# Insert your test code below, the Test::More module is use()ed here so read -# its man page ( perldoc Test::More ) for help writing this test script. +sub get_request {} +sub parse_location { + my $self = shift; + my @pi = @Fake::MVC::url; + shift @pi while @pi and !$pi[0]; + $self->{table} = shift @pi; + $self->{action} = shift @pi; + $self->{args} = \@pi; +}