App-GitHooks-Plugin-PerlInterpreter

 view release on metacpan or  search on metacpan

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

113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
                                plugins                 => [ 'App::GitHooks::Plugin::PerlInterpreter' ],
                        );
 
                        # Set up test files.
                        ok_add_files(
                                files      => $test->{'files'},
                                repository => $repository,
                        );
 
                        # Try to commit.
                        my $stderr;
                        lives_ok(
                                sub
                                {
                                        $stderr = Capture::Tiny::capture_stderr(
                                                sub
                                                {
                                                        $repository->run( 'commit', '-m', 'Test message.' );
                                                }
                                        );
                                        note( $stderr );
                                },
                                'Commit the changes.',
                        );
 
                        like(
                                $stderr,
                                $test->{'expected'},
                                "The output matches expected results.",
                        );
                }
        );
}



( run in 0.259 second using v1.01-cache-2.11-cpan-1dc43b0fbd2 )