use strict;
use warnings;
-use Test::More tests => 30;
+use Test::More tests => 34;
use App::Rgit;
$res = eval { App::Rgit::Command->action('version') };
is($@, '', 'App::Rgit::Command->action("version"): does not croak');
-is($res, 'App::Rgit::Command::Once', 'App::Rgit::Command->action("version"): returns valid object');
+is($res, 'App::Rgit::Command::Once', 'App::Rgit::Command->action("version"): returns valid answer');
$res = eval { App::Rgit::Command->new(cmd => 'version')->action() };
is($@, '', 'App::Rgit::Command->action(): does not croak');
-is($res, 'App::Rgit::Command::Once', 'App::Rgit::Command->action(): returns valid object');
+is($res, 'App::Rgit::Command::Once', 'App::Rgit::Command->action(): returns valid answer');
$res = eval { App::Rgit::Command->action() };
is($@, '', 'App::Rgit::Command->action(): no cmd: does not croak');
$res = eval { $res->App::Rgit::Command::action() };
is($@, '', 'App::Rgit::Test::Monkey->App::Rgit::Command::action(): no cmd: does not croak');
is($res, undef, 'App::Rgit::Test::Monkey->App::Rgit::Command::action(); no cmd: returns undef');
+
+$res = eval { App::Rgit::Command->action('beer' => 'App::Rgit::Test::Pub') };
+is($@, '', 'App::Rgit::Command->action("beer" => "App::Rgit::Test::Pub"): does not croak');
+is($res, 'App::Rgit::Test::Pub', 'App::Rgit::Command->action("beer" => "App::Rgit::Test::Pub"): returns valid answer');
+
+$res = eval { App::Rgit::Command->action('beer') };
+is($@, '', 'App::Rgit::Command->action("beer"): does not croak');
+is($res, 'App::Rgit::Test::Pub', 'App::Rgit::Command->action("beer"): returns valid answer');
+