[Jifty-commit] jifty branch, master, updated. 1.10214-4-g811f9f8
Jifty commits
jifty-commit at lists.jifty.org
Fri Feb 18 19:47:34 EST 2011
The branch, master has been updated
via 811f9f83efe6c1a6654ef2cef9a6c30ae165c88c (commit)
via b6a8f1470568d02d91d4aeba20bb94f505d7b8cb (commit)
from d46ff1c5d38fd889acb90bfaa4e831b5db090857 (commit)
Summary of changes:
Makefile.PL | 1 -
t/01-version_checks.t | 26 +++---
t/99-tabs.t | 7 ++
.../lib/TestApp/Plugin/SinglePage/View.pm | 100 ++++++++++----------
t/TestApp/lib/TestApp/Dispatcher.pm | 2 +-
t/TestApp/lib/TestApp/View/base.pm | 6 +-
t/TestApp/t/08-notifications.t | 16 ++--
t/TestApp/t/15-template-subclass.t | 16 ++--
8 files changed, 90 insertions(+), 84 deletions(-)
create mode 100644 t/99-tabs.t
- Log -----------------------------------------------------------------
commit b6a8f1470568d02d91d4aeba20bb94f505d7b8cb
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Fri Feb 18 19:37:44 2011 -0500
Kill tabs and add t/99-tabs.t which uses Test::NoTabs
diff --git a/t/01-version_checks.t b/t/01-version_checks.t
index 251304b..f56699b 100644
--- a/t/01-version_checks.t
+++ b/t/01-version_checks.t
@@ -21,9 +21,9 @@ my @files = grep({$_ and $_ =~ m/^$dir/} map({$INC{$_}} grep(/^Jifty\//, keys(%I
ok(scalar(@files));
foreach my $file (@files) {
- # Gah! parse_version complains on stderr!
- my ($e, @a) = error_catch(sub {MM->parse_version($file)});
- ok(($e || '') eq '', $file) or warn "$e ";
+ # Gah! parse_version complains on stderr!
+ my ($e, @a) = error_catch(sub {MM->parse_version($file)});
+ ok(($e || '') eq '', $file) or warn "$e ";
}
# runs subroutine reference, looking for error message $look in STDERR
@@ -31,15 +31,15 @@ foreach my $file (@files) {
# ($errs, @ans) = error_catch(sub {$this->test()});
#
sub error_catch {
- my ($sub) = @_;
- my $TO_ERR;
- open($TO_ERR, '<&STDERR');
- close(STDERR);
- my $catch;
- open(STDERR, '>', \$catch);
- my @ans = $sub->();
- open(STDERR, ">&", $TO_ERR);
- close($TO_ERR);
- return($catch, @ans);
+ my ($sub) = @_;
+ my $TO_ERR;
+ open($TO_ERR, '<&STDERR');
+ close(STDERR);
+ my $catch;
+ open(STDERR, '>', \$catch);
+ my @ans = $sub->();
+ open(STDERR, ">&", $TO_ERR);
+ close($TO_ERR);
+ return($catch, @ans);
} # end subroutine error_catch definition
########################################################################
diff --git a/t/99-tabs.t b/t/99-tabs.t
new file mode 100644
index 0000000..7502e34
--- /dev/null
+++ b/t/99-tabs.t
@@ -0,0 +1,7 @@
+use Test::More;
+plan skip_all => "Tab tests only run for authors" unless (-d 'inc/.author');
+
+eval "use Test::NoTabs 1.00";
+plan skip_all => "Test::NoTabs 1.00 required for testing POD coverage" if $@;
+
+all_perl_files_ok('lib', 't', 'share');
diff --git a/t/TestApp-Plugin-SinglePage/lib/TestApp/Plugin/SinglePage/View.pm b/t/TestApp-Plugin-SinglePage/lib/TestApp/Plugin/SinglePage/View.pm
index 498d8d0..ff09700 100644
--- a/t/TestApp-Plugin-SinglePage/lib/TestApp/Plugin/SinglePage/View.pm
+++ b/t/TestApp-Plugin-SinglePage/lib/TestApp/Plugin/SinglePage/View.pm
@@ -7,67 +7,67 @@ use Jifty::View::Declare::Helpers;
template '/index.html' =>
page { title => 'test' }
content {
- with (submit_to => '/page2'),
- form {
- select { { name is 'foo' };
- option { { value is $_ }; $_ } for 1..10;
- };
- form_submit( label => 'Next' );
- };
- render_region('random');
-
- hyperlink(
- url => '/xxx',
- escape_label => 0,
- label => 'Link Test',
- );
-
- hr { };
-
- hyperlink(
- url => '/xxx',
- escape_label => 0,
- label => 'Link Test with parameters',
- parameters => { id => 3 },
- );
-
- hr { };
-
- hyperlink(
- label => 'foo',
- onclick => {
- region => 'foo',
- replace_with => '_r_foo',
- args => { foo => '123123' } }
- );
+ with (submit_to => '/page2'),
+ form {
+ select { { name is 'foo' };
+ option { { value is $_ }; $_ } for 1..10;
+ };
+ form_submit( label => 'Next' );
+ };
+ render_region('random');
+
+ hyperlink(
+ url => '/xxx',
+ escape_label => 0,
+ label => 'Link Test',
+ );
+
+ hr { };
+
+ hyperlink(
+ url => '/xxx',
+ escape_label => 0,
+ label => 'Link Test with parameters',
+ parameters => { id => 3 },
+ );
+
+ hr { };
+
+ hyperlink(
+ label => 'foo',
+ onclick => {
+ region => 'foo',
+ replace_with => '_r_foo',
+ args => { foo => '123123' } }
+ );
};
template '/page2' =>
page { title => 'page2' }
content {
- my $foo = get('foo');
- my $create = Jifty->web->new_action( class => 'CreateUser', moniker => 'create_user',
- arguments => { name => $foo });
- my $redir = new_action(class => "Jifty::Action::Redirect",
- arguments => { url => '/index.html' });
- render_region( 'foo' );
- hyperlink( label => 'foo', onclick => { region => 'foo', replace_with => '_r_foo', args => { foo => '123123' } } );
-
- form {
- Jifty->web->form->register_action($redir);
- render_action($create);
- form_submit( label => 'Next' );
- }
+ my $foo = get('foo');
+ my $create = Jifty->web->new_action( class => 'CreateUser', moniker => 'create_user',
+ arguments => { name => $foo });
+ my $redir = new_action(class => "Jifty::Action::Redirect",
+ arguments => { url => '/index.html' });
+ render_region( 'foo' );
+ hyperlink( label => 'foo', onclick => { region => 'foo', replace_with => '_r_foo', args => { foo => '123123' } } );
+
+ form {
+ Jifty->web->form->register_action($redir);
+ render_action($create);
+ form_submit( label => 'Next' );
+ }
};
template 'page3' =>
page { title => 'page3' }
content {
- h1 { 'yatta' };
- form {
- hyperlink(label => 'Back', url => '/');
- }
+ h1 { 'yatta' };
+ form {
+ hyperlink(label => 'Back', url => '/');
+ }
};
template '_r_foo' => sub {
diff --git a/t/TestApp/lib/TestApp/Dispatcher.pm b/t/TestApp/lib/TestApp/Dispatcher.pm
index ddb6a01..6af7c51 100644
--- a/t/TestApp/lib/TestApp/Dispatcher.pm
+++ b/t/TestApp/lib/TestApp/Dispatcher.pm
@@ -89,7 +89,7 @@ before '__jifty/webservices/*' => run {
on qr{(__jifty/webservices/.*)} => run {
my (@actions) = values %{ Jifty->web->request->{'actions'} };
for my $act (@actions) {
- warn Dumper($act);
+ warn Dumper($act);
}
};
diff --git a/t/TestApp/lib/TestApp/View/base.pm b/t/TestApp/lib/TestApp/View/base.pm
index e075746..adf5da2 100644
--- a/t/TestApp/lib/TestApp/View/base.pm
+++ b/t/TestApp/lib/TestApp/View/base.pm
@@ -7,7 +7,7 @@ template 'list_ht' => sub {
my $self = shift;
outs("/base/list=$self");
for (0..1) {
- $self->resolve_template('view')->();
+ $self->resolve_template('view')->();
}
};
@@ -15,7 +15,7 @@ template 'list_s' => sub {
my $self = shift;
outs("/base/list=$self");
for (0..1) {
- show($self->base_path.'/view');
+ show($self->base_path.'/view');
}
};
@@ -23,7 +23,7 @@ template 'list_rg' => sub {
my $self = shift;
outs("/base/list=$self");
for (0..1) {
- render_region('view-'.$_, path => $self->base_path.'/view');
+ render_region('view-'.$_, path => $self->base_path.'/view');
}
};
diff --git a/t/TestApp/t/08-notifications.t b/t/TestApp/t/08-notifications.t
index 204449f..bc89fdd 100644
--- a/t/TestApp/t/08-notifications.t
+++ b/t/TestApp/t/08-notifications.t
@@ -14,14 +14,14 @@ my $html = "<html><body>This is the HTML portion of the test email</body></html>
my $text = "This is the text portion of the text email";
my $test_email = Email::MIME->create_html(
- header => [
- From => 'test at test',
- To => 'test2 at test2',
- Subject => 'This is a test email',
- ],
- body => $html,
- text_body => $text
- );
+ header => [
+ From => 'test at test',
+ To => 'test2 at test2',
+ Subject => 'This is a test email',
+ ],
+ body => $html,
+ text_body => $text
+);
diff --git a/t/TestApp/t/15-template-subclass.t b/t/TestApp/t/15-template-subclass.t
index 8efa53a..5084ae5 100644
--- a/t/TestApp/t/15-template-subclass.t
+++ b/t/TestApp/t/15-template-subclass.t
@@ -13,14 +13,14 @@ my @tests = (
{
url => "/base/list_s",
text => '/base/list=TestApp::View::base'.
- '/base/view=TestApp::View::base'.
- '/base/view=TestApp::View::base'
+ '/base/view=TestApp::View::base'.
+ '/base/view=TestApp::View::base'
},
{
url => "/base/list_ht",
text => '/base/list=TestApp::View::base'.
- '/base/view=TestApp::View::base'.
- '/base/view=TestApp::View::base'
+ '/base/view=TestApp::View::base'.
+ '/base/view=TestApp::View::base'
},
{
url => "/base/list_rg",
@@ -34,14 +34,14 @@ my @tests = (
{
url => "/instance/list_s",
text => '/base/list=TestApp::View::instance'.
- '/instance/view=TestApp::View::instance'.
- '/instance/view=TestApp::View::instance'
+ '/instance/view=TestApp::View::instance'.
+ '/instance/view=TestApp::View::instance'
},
{
url => "/instance/list_ht",
text => '/base/list=TestApp::View::instance'.
- '/instance/view=TestApp::View::instance'.
- '/instance/view=TestApp::View::instance'
+ '/instance/view=TestApp::View::instance'.
+ '/instance/view=TestApp::View::instance'
},
{
url => "/instance/list_rg",
commit 811f9f83efe6c1a6654ef2cef9a6c30ae165c88c
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Fri Feb 18 19:38:31 2011 -0500
Test::Pod::Coverage is merely an author dep
We also don't list Test::Pod, Test::Pod::Spelling, or Test::NoTabs
as explicit runtime deps
diff --git a/Makefile.PL b/Makefile.PL
index 6ed94d5..f3c5b2f 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -83,7 +83,6 @@ requires('Test::Base');
requires('Test::Exception');
requires('Test::LongString');
requires('Test::More' => 0.62 );
-requires('Test::Pod::Coverage');
requires('Test::Script::Run' => 0.03);
requires('Test::WWW::Mechanize' => 1.04 );
requires('Test::WWW::Mechanize::PSGI' => 0.35 );
-----------------------------------------------------------------------
More information about the Jifty-commit
mailing list