Changelogging
[gitmo/Mouse.git] / t-failing / 400_moose_util / 008_method_mod_args.t
1 use strict;
2 # This is automatically generated by author/import-moose-test.pl.
3 # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4 use t::lib::MooseCompat;
5 use warnings;
6
7 use Test::More;
8 $TODO = q{Mouse is not yet completed};
9 use Test::Exception;
10 use Mouse::Util qw( add_method_modifier );
11
12 my $COUNT = 0;
13 {
14     package Foo;
15     use Mouse;
16
17     sub foo { }
18     sub bar { }
19 }
20
21 lives_ok {
22     add_method_modifier('Foo', 'before', [ ['foo', 'bar'], sub { $COUNT++ } ]);
23 } 'method modifier with an arrayref';
24
25 dies_ok {
26     add_method_modifier('Foo', 'before', [ {'foo' => 'bar'}, sub { $COUNT++ } ]);
27 } 'method modifier with a hashref';
28
29 my $foo = Foo->new;
30 $foo->foo;
31 $foo->bar;
32 is($COUNT, 2, "checking that the modifiers were installed.");
33
34
35 done_testing;