From: Tomas Doran Date: Wed, 19 Aug 2009 19:03:01 +0000 (+0000) Subject: Move test to make more sense in my idea of the naming scheme - t/dead_ is for tests... X-Git-Tag: 5.80008~9 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=f1abcb4a7a3374b2e400b33b9cf5c0c6a5d49734 Move test to make more sense in my idea of the naming scheme - t/dead_ is for tests which check the app pukes, which this shouldn't --- diff --git a/t/dead_test_class_exception.t b/t/custom_exception_class_simple.t similarity index 100% rename from t/dead_test_class_exception.t rename to t/custom_exception_class_simple.t diff --git a/t/lib/TestAppStats.pm b/t/lib/TestAppStats.pm index bfc1340..99d0e1e 100644 --- a/t/lib/TestAppStats.pm +++ b/t/lib/TestAppStats.pm @@ -16,16 +16,9 @@ __PACKAGE__->log(TestAppStats::Log->new); __PACKAGE__->setup; -# Return log messages from previous request -sub default : Private { - my ( $self, $c ) = @_; - $c->stats->profile("test"); - $c->res->body(join("\n", @log_messages)); - @log_messages = (); -} package TestAppStats::Log; use base qw/Catalyst::Log/; -sub info { push(@log_messages, @_); } -sub debug { push(@log_messages, @_); } +sub info { push(@TestAppStats::log_messages, @_); } +sub debug { push(@TestAppStats::log_messages, @_); } diff --git a/t/lib/TestAppStats/Controller/Root.pm b/t/lib/TestAppStats/Controller/Root.pm new file mode 100644 index 0000000..c2c9ec5 --- /dev/null +++ b/t/lib/TestAppStats/Controller/Root.pm @@ -0,0 +1,17 @@ +package TestAppStats::Controller::Root; +use strict; +use warnings; +use base qw/Catalyst::Controller/; + +__PACKAGE__->config->{namespace} = ''; + +# Return log messages from previous request +sub default : Private { + my ( $self, $c ) = @_; + $c->stats->profile("test"); + $c->res->body(join("\n", @TestAppStats::log_messages)); + @TestAppStats::log_messages = (); +} + +1; +