X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F10.pidfile.t;h=a5a06c02af38f0b969831f8a55473e18a1b3c815;hb=eaf252a6da8a9b8b1e70c2d491302872df5f71eb;hp=66ccb3310f4a954b5aa4e13db5b85a08bb94947e;hpb=2eced27121e8557fe773f6f8804786f29f5660c1;p=gitmo%2FMooseX-Daemonize.git diff --git a/t/10.pidfile.t b/t/10.pidfile.t index 66ccb33..a5a06c0 100644 --- a/t/10.pidfile.t +++ b/t/10.pidfile.t @@ -7,14 +7,14 @@ use Test::More tests => 25; use Test::Exception; BEGIN { - use_ok('MooseX::Daemonize::PidFile'); + use_ok('MooseX::Daemonize::Pid::File'); } { - my $f = MooseX::Daemonize::PidFile->new( + my $f = MooseX::Daemonize::Pid::File->new( file => [ 't', 'foo.pid' ] ); - isa_ok($f, 'MooseX::Daemonize::PidFile'); + isa_ok($f, 'MooseX::Daemonize::Pid::File'); isa_ok($f->file, 'Path::Class::File'); @@ -26,7 +26,7 @@ BEGIN { is($f->file->slurp(chomp => 1), $f->pid, '... the PID in the file is correct'); - ok($f->running, '... it is running too'); + ok($f->is_running, '... it is running too'); lives_ok { $f->remove @@ -36,10 +36,10 @@ BEGIN { } { - my $f = MooseX::Daemonize::PidFile->new( + my $f = MooseX::Daemonize::Pid::File->new( file => [ 't', 'bar.pid' ] ); - isa_ok($f, 'MooseX::Daemonize::PidFile'); + isa_ok($f, 'MooseX::Daemonize::Pid::File'); isa_ok($f->file, 'Path::Class::File'); @@ -50,7 +50,7 @@ BEGIN { is($f->file->slurp(chomp => 1), $f->pid, '... the PID in the file is correct'); is($f->pid, $$, '... the PID is our current process'); - ok($f->running, '... it is running too'); + ok($f->is_running, '... it is running too'); lives_ok { $f->remove @@ -60,13 +60,13 @@ BEGIN { } { - my $PID = 2001; + my $PID = 9999; - my $f = MooseX::Daemonize::PidFile->new( + my $f = MooseX::Daemonize::Pid::File->new( file => [ 't', 'baz.pid' ], pid => $PID, ); - isa_ok($f, 'MooseX::Daemonize::PidFile'); + isa_ok($f, 'MooseX::Daemonize::Pid::File'); isa_ok($f->file, 'Path::Class::File'); @@ -78,7 +78,7 @@ BEGIN { is($f->file->slurp(chomp => 1), $f->pid, '... the PID in the file is correct'); - ok(!$f->running, '... it is not running (cause we made the PID up)'); + ok(!$f->is_running, '... it is not running (cause we made the PID up)'); lives_ok { $f->remove