[Jifty-commit] r2473 - Template-Declare/t

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sat Jan 6 05:09:29 EST 2007


Author: clkao
Date: Sat Jan  6 05:09:28 2007
New Revision: 2473

Modified:
   Template-Declare/t/roots.t

Log:
failing tests expecting correct $self in template blocks.

Modified: Template-Declare/t/roots.t
==============================================================================
--- Template-Declare/t/roots.t	(original)
+++ Template-Declare/t/roots.t	Sat Jan  6 05:09:28 2007
@@ -6,7 +6,7 @@
 use Template::Declare::Tags;
 
 template 'imported' => sub {
-    div { outs('This is imported') };
+    div { outs('This is imported from'.$self) };
 };
 
 package Wifty::UI;
@@ -24,7 +24,7 @@
 
 private template 'private-content' => sub {
     with( id => 'body' ), div {
-        outs('This is my content');
+        outs('This is my content from'.$self);
     };
 };
 
@@ -60,13 +60,14 @@
 use Template::Declare::Tags;
 Template::Declare->init(roots => ['Baseclass::UI', 'Wifty::UI']);
 
-use Test::More tests => 10;
+use Test::More tests => 12;
 use HTML::Lint;
 
 {
     local $Template::Declare::Tags::BUFFER;
     my $simple = ( show('simple') );
-   like( $simple,  qr'This is my content' );
+    like( $simple,  qr'This is my content' );
+    like( $simple,  qr'Wifty::UI', '$self is correct in template block' );
     ok_lint($simple);
 }
 
@@ -97,6 +98,7 @@
     local $Template::Declare::Tags::BUFFER;
     my $simple = ( show('something/imported') );
     like( $simple, qr'This is imported' );
+    like( $simple, qr'Wifty::UI::something', '$self is correct in template block' );
     ok_lint($simple);
 }
 


More information about the Jifty-commit mailing list