Make test less noisy by removing -Debug and cleaning up wide charin print errors
[catagits/Test-WWW-Mechanize-Catalyst.git] / t / lib / Catty.pm
index cdd1405..9d3e043 100644 (file)
@@ -3,9 +3,10 @@ package Catty;
 use strict;
 
 #use Catalyst;
-use Catalyst qw/-Debug/;
+use Catalyst;
 use Cwd;
 use MIME::Base64;
+use Encode qw//;
 
 our $VERSION = '0.01';
 
@@ -13,8 +14,8 @@ Catty->config(
     name => 'Catty',
     root => cwd . '/t/root',
 );
-
 Catty->setup();
+Catty->log->levels(undef);
 
 sub default : Private {
     my ( $self, $context ) = @_;
@@ -25,7 +26,8 @@ sub default : Private {
 
 sub hello : Global {
     my ( $self, $context ) = @_;
-    my $html = html( "Hello", "Hi there! ☺" );
+    my $str = Encode::encode('utf-8', "\x{263A}"); # ☺
+    my $html = html( "Hello", "Hi there! $str" );
     $context->response->content_type("text/html; charset=utf-8");
     $context->response->output($html);
 }