Skip to content

Commit

Permalink
Validate has_method_ok() finds accessors, as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
rsrchboy committed Mar 21, 2017
1 parent 6468e94 commit cc06bb2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion t/method_ok.t
@@ -1,14 +1,16 @@
use strict;
use warnings;

{ package TestClass; use Moose; sub foo { } }
{ package TestClass; use Moose; sub foo { }; has beep => (is => 'ro') }

use Test::Builder::Tester;
use Test::More;
use Test::Moose::More;

subtest sanity => sub {
has_method_ok TestClass => 'foo';
has_method_ok TestClass => 'beep';
subtest multiple => sub { has_method_ok TestClass => 'beep', 'foo' };
has_no_method_ok TestClass => 'bar';
};

Expand Down

0 comments on commit cc06bb2

Please sign in to comment.