X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fbasic.t;h=b8fee8e9cd8c12e3acb43f01771715036c7440a0;hb=a27266b77a5c66f0c059c865193f64871d0dd90c;hp=24913dc95950eb1761be90fa535efba7e20941b5;hpb=fe6c9a7f0f8b12f9424ed3aa7ea6c4a783581ce9;p=scpubgit%2FObject-Remote.git diff --git a/t/basic.t b/t/basic.t index 24913dc..b8fee8e 100644 --- a/t/basic.t +++ b/t/basic.t @@ -1,21 +1,20 @@ use strictures 1; use Test::More; +use Sys::Hostname qw(hostname); + +require 't/logsetup.pl'; -use Object::Remote::Connector::Local; use Object::Remote; $ENV{PERL5LIB} = join( ':', ($ENV{PERL5LIB} ? $ENV{PERL5LIB} : ()), qw(lib t/lib) ); -my $connection = Object::Remote::Connector::Local->new->connect; +my $connection = Object::Remote->connect('-'); #$Object::Remote::Connection::DEBUG = 1; -my $remote = Object::Remote->new( - connection => $connection, - class => 'ORTestClass' -); +my $remote = ORTestClass->new::on($connection); isnt($$, $remote->pid, 'Different pid on the other side'); @@ -31,4 +30,10 @@ is($remote->call_callback(27, sub { $x++ }), 27, "Callback ok"); is($x, 1, "Callback called callback"); +is( + Sys::Hostname->can::on($connection, 'hostname')->(), + hostname(), + 'Remote sub call ok' +); + done_testing;