Skip to content

Commit

Permalink
Started testing capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanwills committed Mar 26, 2015
1 parent 8507c29 commit 57ccea4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions t/lib/VCS/Which/Plugin/Blank.pm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ our $name = 'Blank';
our $exe = 'blank';
our $meta = '.blank';

sub installed { 1 }


1;
Expand Down
17 changes: 17 additions & 0 deletions t/which.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,27 @@ use lib qw{t/lib};
use VCS::Which;

new();
capabilities();

done_testing();

sub new {
my $vcsw = eval { VCS::Which->new };
ok !$@, "No error creating" or diag $@;

$vcsw = eval { VCS::Which->new( dir => '.' ) };
ok !$@, "No error creating" or diag $@;

$vcsw = eval { VCS::Which->new( dir => 'Build.PL' ) };
ok !$@, "No error creating" or diag $@;
}

sub capabilities {
my $vcsw = eval { VCS::Which->new };

my %capabilities = $vcsw->capabilities;

# Only guarentee Blank installed
ok $capabilities{Blank}, "Blank test VCS installed";
}

0 comments on commit 57ccea4

Please sign in to comment.