]> git.decadent.org.uk Git - maypole.git/blobdiff - t/1.t
Some fixes and the bare beginnings of a test suite.
[maypole.git] / t / 1.t
diff --git a/t/1.t b/t/1.t
index bb56b7ab4c1bc9e149c782dfe67df593359b140d..ff8ae7347db6a2b5f7a7e566147f96803dde4f69 100644 (file)
--- 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;
+}