fix punctuation
[gitmo/Moose.git] / t / test_moose / test_moose_has_attribute_ok.t
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 use Test::Builder::Tester;
7 use Test::More;
8
9 use Test::Moose;
10
11 {
12     package Foo;
13     use Moose;
14
15     has 'foo', is => 'bare';
16 }
17
18 {
19     package Bar;
20     use Moose;
21
22     extends 'Foo';
23
24     has 'bar', is => 'bare';
25 }
26
27
28 test_out('ok 1 - ... has_attribute_ok(Foo, foo) passes');
29
30 has_attribute_ok('Foo', 'foo', '... has_attribute_ok(Foo, foo) passes');
31
32 test_out ('not ok 2 - ... has_attribute_ok(Foo, bar) fails');
33 test_fail (+2);
34
35 has_attribute_ok('Foo', 'bar', '... has_attribute_ok(Foo, bar) fails');
36
37 test_out('ok 3 - ... has_attribute_ok(Bar, foo) passes');
38
39 has_attribute_ok('Bar', 'foo', '... has_attribute_ok(Bar, foo) passes');
40
41 test_out('ok 4 - ... has_attribute_ok(Bar, bar) passes');
42
43 has_attribute_ok('Bar', 'bar', '... has_attribute_ok(Bar, bar) passes');
44
45 test_test ('has_attribute_ok');
46
47 done_testing;