Git::Repository::Plugin::Test - Helper methods for testing interactions with Git
version 0.006
use Test::More tests => 2; use Git::Repository qw(Test); my $repo = Git::Repository->new(...); # run Git commands as tests $repo->run_exit_ok('status'); $repo->run_exit_is(1, 'nonexistant-subcommand');
Adds run_exit_ok and run_exit_is methods to the Git::Repository object that can be used for testing Git operations.
run_exit_ok
run_exit_is
Git::Repository::Plugin::Test adds the following methods:
Like Git::Repository's run but exceptions are caught and reported as test failures.
run
Like Git::Repository's run but exceptions are caught and reported as test failures unless exit code matches expected exit code.
Test for the existance of a branch.
Git::Repository, Test::Builder, Git::Repository::Plugin::TestSetUp
Nathaniel G. Nutter <nnutter@cpan.org>
Copyright 2013 - Nathaniel G. Nutter
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Git::Repository::Plugin::Test, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Git::Repository::Plugin::Test
CPAN shell
perl -MCPAN -e shell install Git::Repository::Plugin::Test
For more information on module installation, please visit the detailed CPAN module installation guide.