Add tests related to attribute traits
[gitmo/Mouse.git] / t / 044-attribute-metaclass.t
index bd9ca8f..bb10b1e 100644 (file)
@@ -5,13 +5,15 @@ use Test::More tests => 2;
 use lib 't/lib';
 
 do {
+    local $SIG{__WARN__} = sub{ $_[0] =~ /deprecated/ or warn @_ };
+
     package MouseX::AttributeHelpers::Number;
     use Mouse;
     extends 'Mouse::Meta::Attribute';
 
-    around 'create' => sub {
-        my ($next, @args) = @_;
-        my $attr = $next->(@args);
+    sub create {
+        my ($self, @args) = @_;
+        my $attr = $self->SUPER::create(@args);
         my %provides = %{$attr->{provides}};
         my $method_constructors = {
             add => sub {