Deprecate UTF8Columns with a lot of warning whistles
[dbsrgits/DBIx-Class.git] / t / 85utf8.t
index fd2c0e9..a5ffbcb 100644 (file)
@@ -22,6 +22,7 @@ use DBICTest;
 
 warnings_are (
   sub {
+    local $ENV{DBIC_UTF8COLUMNS_OK} = 1;
     package A::Test1;
     use base 'DBIx::Class::Core';
     __PACKAGE__->load_components(qw(Core +A::Comp Ordered UTF8Columns));
@@ -91,9 +92,8 @@ Class::C3->reinitialize();
   }
 }
 
-# there's some weird bug in Test::Builder that spews out wide-character warnings
-# without any print taking place
-$SIG{__WARN__} = sub { warn $_[0] unless $_[0] =~ /Wide character in print/ };
+# as per http://search.cpan.org/dist/Test-Simple/lib/Test/More.pm#utf8
+binmode (Test::More->builder->$_, ':utf8') for qw/output failure_output todo_output/;
 
 my $bytestream_title = my $utf8_title = "weird \x{466} stuff";
 utf8::encode($bytestream_title);