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