use Cwd qw/cwd/;
use File::Spec::Functions qw/catdir/;
-use Test::More tests => 44;
+use Test::More tests => 45;
use App::Rgit;
is($@, '', 'App::Rgit::Command->action("beer"): does not croak');
is($res, 'App::Rgit::Test::Pub', 'App::Rgit::Command->action("beer"): returns valid answer');
+$res = eval { App::Rgit::Command->new(cmd => 'beer') };
+like($@, qr!Couldn't\s+load\s+App::Rgit::Test::Pub\s*:!, 'App::Rgit::Command->new(cmd => "pub"): croaks');
+
use App::Rgit::Config;
my $arc = App::Rgit::Config->new(root => 't', git => 't/bin/git');