From: Robert 'phaylon' Sedlacek Date: Wed, 30 May 2012 18:15:59 +0000 (+0000) Subject: xt for bridged remote objects X-Git-Tag: v0.001001~48 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FObject-Remote.git;a=commitdiff_plain;h=4829a0e16b68906a74ea62265f76c9a68f74893c xt for bridged remote objects --- diff --git a/xt/bridged-remote.t b/xt/bridged-remote.t new file mode 100644 index 0000000..abfbcd5 --- /dev/null +++ b/xt/bridged-remote.t @@ -0,0 +1,16 @@ +use strictures 1; +use Test::More; +use Test::Fatal; +use FindBin; + +use lib "$FindBin::Bin/lib"; + +use TestClass; +use Object::Remote; + +is exception { + my $bridge = TestBridge->new::on('localhost'); + is $bridge->result, 23; +}, undef, 'no error during bridge access'; + +done_testing; diff --git a/xt/lib/TestBridge.pm b/xt/lib/TestBridge.pm new file mode 100644 index 0000000..7a8b82a --- /dev/null +++ b/xt/lib/TestBridge.pm @@ -0,0 +1,13 @@ +package TestBridge; +use Moo; + +use TestClass; +use Object::Remote; + +has object => (is => 'lazy'); + +sub _build_object { TestClass->new::on('root@') } + +sub result { (shift)->object->result } + +1; diff --git a/xt/lib/TestClass.pm b/xt/lib/TestClass.pm new file mode 100644 index 0000000..7efaf1d --- /dev/null +++ b/xt/lib/TestClass.pm @@ -0,0 +1,6 @@ +package TestClass; +use Moo; + +sub result { 23 } + +1;