~ubuntu-branches/ubuntu/vivid/libclass-accessor-grouped-perl/vivid

« back to all changes in this revision

Viewing changes to t/component.t

  • Committer: Package Import Robot
  • Author(s): Xavier Guimard
  • Date: 2013-03-19 06:29:32 UTC
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: package-import@ubuntu.com-20130319062932-xngayhbrbvykfcvh
Tags: upstream-0.10009
ImportĀ upstreamĀ versionĀ 0.10009

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
use strict;
4
4
use warnings;
5
5
use lib 't/lib';
6
 
use Class::Inspector;
7
6
use AccessorGroupsComp;
8
7
 
9
8
is(AccessorGroupsComp->result_class, undef);
11
10
## croak on set where class can't be loaded and it's a physical class
12
11
my $dying = AccessorGroupsComp->new;
13
12
throws_ok {
14
 
    $dying->result_class('NotReallyAClass');
 
13
  $dying->result_class('NotReallyAClass');
15
14
} qr/Could not load result_class 'NotReallyAClass'/;
16
15
is($dying->result_class, undef);
17
16
 
21
20
$dying->result_class('JunkiesNeverInstalled');
22
21
is($dying->result_class, 'JunkiesNeverInstalled');
23
22
 
24
 
ok(!Class::Inspector->loaded('BaseInheritedGroups'));
 
23
ok(! $INC{'BaseInheritedGroups.pm'});
25
24
AccessorGroupsComp->result_class('BaseInheritedGroups');
26
 
ok(Class::Inspector->loaded('BaseInheritedGroups'));
 
25
ok($INC{'BaseInheritedGroups.pm'});
27
26
is(AccessorGroupsComp->result_class, 'BaseInheritedGroups');
28
27
 
29
28
## unset it