diff options
author | Jesse Luehrs <doy@tozt.net> | 2011-06-14 16:04:36 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2011-06-14 16:04:36 -0500 |
commit | 36ea288cc78dedaadd1d3b38331489646be26626 (patch) | |
tree | 4e2c123e9a1b0d8fe50036b03ab17af7850988ba /t/20-inheritance.t | |
parent | 65028d365fcfa1f28b0f0e85e8443b3b1c9dad34 (diff) | |
download | bread-board-declare-36ea288cc78dedaadd1d3b38331489646be26626.tar.gz bread-board-declare-36ea288cc78dedaadd1d3b38331489646be26626.zip |
remove test numbers
Diffstat (limited to 't/20-inheritance.t')
-rw-r--r-- | t/20-inheritance.t | 123 |
1 files changed, 0 insertions, 123 deletions
diff --git a/t/20-inheritance.t b/t/20-inheritance.t deleted file mode 100644 index b1517e8..0000000 --- a/t/20-inheritance.t +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/env perl -use strict; -use warnings; -use Test::More; -use Test::Moose; - -{ - package Parent; - use Moose; - use Bread::Board::Declare; - - has foo => ( - is => 'ro', - isa => 'Str', - value => 'FOO', - ); - - has bar => ( - is => 'ro', - isa => 'Str', - block => sub { - my $s = shift; - return $s->param('foo') . 'BAR'; - }, - dependencies => ['foo'], - ); -} - -{ - package Child; - use Moose; - use Bread::Board::Declare; - - extends 'Parent'; - - has baz => ( - is => 'ro', - isa => 'Str', - value => 'BAZ', - ); - - has quux => ( - is => 'ro', - isa => 'Str', - block => sub { - my $s = shift; - return $s->param('foo') - . $s->param('bar') - . $s->param('baz') - . 'QUUX'; - }, - dependencies => ['foo', 'bar', 'baz'], - ); -} - -with_immutable { -{ - my $parent = Parent->new; - ok($parent->has_service('foo'), "parent has foo"); - ok($parent->has_service('bar'), "parent has bar"); - - my $child = Child->new; - ok($child->has_service('foo'), "child has foo"); - ok($child->has_service('bar'), "child has bar"); - ok($child->has_service('baz'), "child has baz"); - ok($child->has_service('quux'), "child has quux"); -} - -{ - my $parent = Parent->new; - isa_ok($parent, 'Bread::Board::Container'); - is($parent->foo, 'FOO'); - is($parent->bar, 'FOOBAR'); -} - -{ - my $parent = Parent->new(foo => 'OOF', bar => 'RAB'); - isa_ok($parent, 'Bread::Board::Container'); - is($parent->foo, 'OOF'); - is($parent->bar, 'RAB'); -} - -{ - my $parent = Parent->new(foo => 'OOF'); - isa_ok($parent, 'Bread::Board::Container'); - is($parent->foo, 'OOF'); - is($parent->bar, 'OOFBAR'); -} - -{ - my $child = Child->new; - is($child->foo, 'FOO'); - is($child->bar, 'FOOBAR'); - is($child->baz, 'BAZ'); - is($child->quux, 'FOOFOOBARBAZQUUX'); -} - -{ - my $child = Child->new( - foo => 'OOF', - bar => 'RAB', - baz => 'ZAB', - quux => 'XUUQ', - ); - is($child->foo, 'OOF'); - is($child->bar, 'RAB'); - is($child->baz, 'ZAB'); - is($child->quux, 'XUUQ'); -} - -{ - my $child = Child->new( - foo => 'OOF', - baz => 'ZAB', - ); - is($child->foo, 'OOF'); - is($child->bar, 'OOFBAR'); - is($child->baz, 'ZAB'); - is($child->quux, 'OOFOOFBARZABQUUX'); -} -} 'Parent', 'Child'; - -done_testing; |