[Catalyst-commits] r12928 -
Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial
hkclark at dev.catalyst.perl.org
hkclark at dev.catalyst.perl.org
Wed Feb 17 17:40:52 GMT 2010
Author: hkclark
Date: 2010-02-17 17:40:52 +0000 (Wed, 17 Feb 2010)
New Revision: 12928
Modified:
Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/08_Testing.pod
Log:
Remove now old mention of "used more than once" errors
Fix missing indent in code block
Show all of __PACKAGE__->config in DB Model
Modified: Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/08_Testing.pod
===================================================================
--- Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/08_Testing.pod 2010-02-17 17:39:40 UTC (rev 12927)
+++ Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/08_Testing.pod 2010-02-17 17:40:52 UTC (rev 12928)
@@ -132,29 +132,6 @@
$ CATALYST_DEBUG=0 prove -wl t
-B<Note:> Depending on the versions of various modules you have
-installed, you might get some C<used only once> warnings -- you can
-ignore these. If you want to eliminate the warnings, you can
-edit C<Template::Base> to disable and then re-enable warnings
-are the C</usr/lib/perl5/Template/Base.pm> line in C<sub new>.
-You can locate where C<Template::Base> is located with the
-following command (it's probably in a place similar to
-C</usr/lib/perl5/Template/Base.pm>):
-
- perldoc -l Template::Base
-
-Edit the file and modify C<sub new> to match:
-
- ...
- { no strict qw( refs );
- # Disable warnings
- no warnings;
- $argnames = \@{"$class\::BASEARGS"} || [ ];
- # Turn warnings back on
- use warnings;
- }
- ...
-
During the C<t/02pod> and C<t/03podcoverage> tests, you might notice the
C<all skipped: set TEST_POD to enable this test> warning message. To
execute the Pod-related tests, add C<TEST_POD=1> to the C<prove>
@@ -299,7 +276,7 @@
# User 'test02' should not be able to add a book
$ua2->get_ok("http://localhost/books/url_create/TestTitle2/2/5", "'test02' add");
$ua2->content_contains("Unauthorized!", "Check 'test02' cannot add");
-
+
done_testing;
The C<live_app.t> test cases uses copious comments to explain each step
@@ -380,10 +357,14 @@
my $dsn = $ENV{MYAPP_DSN} ||= 'dbi:SQLite:myapp.db';
__PACKAGE__->config(
schema_class => 'MyApp::Schema',
-
+
connect_info => {
dsn => $dsn,
- ...
+ user => '',
+ password => '',
+ on_connect_do => q{PRAGMA foreign_keys = ON},
+ }
+ );
Then, when you run your test case, you can use commands such as:
More information about the Catalyst-commits
mailing list