[Jifty-commit] r2854 - in jifty/trunk: lib/Jifty

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Tue Feb 27 17:33:22 EST 2007


Author: sterling
Date: Tue Feb 27 17:33:21 2007
New Revision: 2854

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Test.pm

Log:
small improvement to Jifty::Test documentation

Modified: jifty/trunk/lib/Jifty/Test.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Test.pm	(original)
+++ jifty/trunk/lib/Jifty/Test.pm	Tue Feb 27 17:33:21 2007
@@ -21,13 +21,20 @@
 
     use Jifty::Test tests => 5;
 
-    ...all of Test::More's functionality...
-
-    ...any class methods defined below...
+    # ...all of Test::More's functionality...
+    my $model = MyApp::Model::MyModel->new;
+    $model->create();
+    ok($model->id, 'model works');
+    is($model->foo, 'some default', 'default works');
+
+    # Startup an external server (see Jifty::TestServer)
+    my $server = Jifty::Test->make_server;
+    my $server_url = $server->started_ok;
+    # You're probably also interested in Jifty::Test::WWW::Mechanized
 
 =head1 DESCRIPTION
 
-Jifty::Test is a superset of Test::More.  It provides all of
+Jifty::Test is a superset of L<Test::More>.  It provides all of
 Test::More's functionality in addition to the class methods defined
 below.
 
@@ -39,9 +46,21 @@
 
 Check if the test is currently in a passing state.
 
-* All tests run so far have passed
-* We have run at least one test
-* We have not run more than we planned (if we planned at all)
+=over
+
+=item * 
+
+All tests run so far have passed
+
+=item * 
+
+We have run at least one test
+
+=item * 
+
+We have not run more than we planned (if we planned at all)
+
+=back
 
 =cut
 
@@ -421,4 +440,10 @@
     unlink $Test->{test_config} if $Test->{test_config};
 }
 
+=head1 SEE ALSO
+
+L<Jifty::Test::WWW::Mechanized>, L<Jifty::TestServer>
+
+=cut
+
 1;


More information about the Jifty-commit mailing list