App-GitHooks-Plugin-RequireCommitMessage

 view release on metacpan or  search on metacpan

t/10-run.t  view on Meta::CPAN

				plugins                 => [ 'App::GitHooks::Plugin::RequireCommitMessage' ],
			);

			# Set up test files.
			ok_add_files(
				files      => $test->{'files'},
				repository => $repository,
			);

			# Try to commit.
			my $stderr;
			my $exit_status;
			lives_ok(
				sub
				{
					$stderr = Capture::Tiny::capture_stderr(
						sub
						{
							$repository->run( 'commit', '-m', $test->{'commit_message'} );
							$exit_status = $? >> 8;
						}
					);
					note( $stderr );
				},
				'Commit the changes.',
			);

			like(
				$stderr,
				$test->{'expected'},
				"The output matches expected results.",
			);

			is(
				$exit_status,
				$test->{'exit_status'},
				'The exit status is correct.',
			);
		}



( run in 0.352 second using v1.01-cache-2.11-cpan-26ccb49234f )