d5c6a482890973537d567987f12ec41eb64e607c
[scpubgit/Object-Remote.git] / t / transfer.t
1 use strictures 1;
2 use Test::More;
3 use Test::Fatal;
4
5 $ENV{PERL5LIB} = join(
6   ':', ($ENV{PERL5LIB} ? $ENV{PERL5LIB} : ()), qw(lib t/lib)
7 );
8
9 use Object::Remote;
10
11 my $strA = 'foo';
12 my $strB = 'bar';
13
14 is exception {
15   my $proxy = ORTestTransfer->new::on('-', value => \$strA);
16   is_deeply $proxy->value, \$strA, 'correct value after construction';
17 }, undef, 'no errors during construction';
18
19 is exception {
20   my $proxy = ORTestTransfer->new::on('-');
21   $proxy->value(\$strB);
22   is_deeply $proxy->value, \$strB, 'correct value after construction';
23 }, undef, 'no errors during attribute set';
24
25 done_testing;