X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F005_w_versions_and_authority_check.t;h=9dba0614f155c303e21d432c6e365f2fe8ff1051;hb=b5f363acfcf077778dd4f3b59460a0cbb9e51400;hp=7acdfbe84d50cc82dcdbf6439f562a714c9ff2ba;hpb=766ab81f59db9f3087e0011112ff2e69133a85c5;p=gitmo%2FMooseX-Storage.git diff --git a/t/005_w_versions_and_authority_check.t b/t/005_w_versions_and_authority_check.t index 7acdfbe..9dba061 100644 --- a/t/005_w_versions_and_authority_check.t +++ b/t/005_w_versions_and_authority_check.t @@ -12,7 +12,7 @@ BEGIN { =pod -This tests that the version and authority +This tests that the version and authority checks are performed upon object expansion. =cut @@ -21,27 +21,27 @@ checks are performed upon object expansion. package Bar; use Moose; use MooseX::Storage; - + our $VERSION = '0.01'; our $AUTHORITY = 'cpan:JRANDOM'; with Storage; - + has 'number' => (is => 'ro', isa => 'Int'); - + package Foo; use Moose; use MooseX::Storage; our $VERSION = '0.01'; - our $AUTHORITY = 'cpan:JRANDOM'; + our $AUTHORITY = 'cpan:JRANDOM'; - with Storage; + with Storage; - has 'bar' => ( - is => 'ro', - isa => 'Bar' - ); + has 'bar' => ( + is => 'ro', + isa => 'Bar' + ); } { @@ -49,7 +49,7 @@ checks are performed upon object expansion. bar => Bar->new(number => 1) ); isa_ok( $foo, 'Foo' ); - + is_deeply( $foo->pack, { @@ -57,7 +57,7 @@ checks are performed upon object expansion. bar => { __CLASS__ => 'Bar-0.01-cpan:JRANDOM', number => 1, - } + } }, '... got the right frozen class' ); @@ -70,16 +70,16 @@ checks are performed upon object expansion. bar => { __CLASS__ => 'Bar-0.01-cpan:JRANDOM', number => 1, - } - }, + } + }, ); isa_ok( $foo, 'Foo' ); isa_ok( $foo->bar, 'Bar' ); is( $foo->bar->number, 1 , '... got the right number too' ); - + } -Moose::Meta::Class->create('Bar', +Moose::Meta::Class->create('Bar', version => '0.02', authority => 'cpan:JRANDOM', ); @@ -91,12 +91,12 @@ dies_ok { bar => { __CLASS__ => 'Bar-0.01-cpan:JRANDOM', number => 1, - } - } + } + } ); } '... could not unpack, versions are different ' . $@; -Moose::Meta::Class->create('Bar', +Moose::Meta::Class->create('Bar', version => '0.01', authority => 'cpan:DSTATIC', ); @@ -108,7 +108,7 @@ dies_ok { bar => { __CLASS__ => 'Bar-0.01-cpan:JRANDOM', number => 1, - } - } + } + } ); } '... could not unpack, authorities are different';