Checking in changes prior to tagging of version 0.90.
[gitmo/Mouse.git] / t / 001_mouse / 060-threads.t
index 65331f0..051a926 100644 (file)
@@ -2,10 +2,13 @@
 use strict;
 use warnings;
 use constant HAS_THREADS => eval{ require threads && require threads::shared };
-
-use if !HAS_THREADS, 'Test::More', (skip_all => "This is a test for threads ($@)");
 use Test::More;
 
+use if !HAS_THREADS, 'Test::More',
+    (skip_all => "This is a test for threads ($@)");
+use if $Test::More::VERSION >= 2.00, 'Test::More',
+    (skip_all => "Test::Builder2 has bugs about threads");
+
 {
     package MyTraits;
     use Mouse::Role;
@@ -28,6 +31,7 @@ use Test::More;
         traits => [qw(MyTraits)],
     );
 }
+pass;
 
 my $o = MyClass->new(foo => Foo->new(value => 42));
 threads->create(sub{
@@ -55,4 +59,6 @@ is $o->foo->value, 43;
 
 ok !$o->meta->is_immutable;
 
+pass "done";
+
 done_testing;