| File: | t/02-basic.t |
| Coverage: | 100.0% |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | 1 1 1 | 3296 2 27 | use strict; | ||||
| 2 | 1 1 1 | 4 1 40 | use warnings; | ||||
| 3 | |||||||
| 4 | 1 1 1 | 405 78802 6 | use Test::More q//; | ||||
| 5 | 1 1 1 | 500 2547 4 | use Test::Exception q//; | ||||
| 6 | |||||||
| 7 | 1 1 1 | 463 939 101 | use FindBin qw/$Bin/; | ||||
| 8 | 1 1 1 | 251 552 4 | use lib qq{$Bin/lib}; | ||||
| 9 | 1 1 1 | 290 2 1005 | use Bar; | ||||
| 10 | |||||||
| 11 | 1 1 | 64456 29 | dies_ok { Bar->new( some => q{thing} ) } q{Test constructor fails when required fields not provided.}; | ||||
| 12 | |||||||
| 13 | 1 | 323 | local $@; | ||||
| 14 | 1 | 2 | eval { | ||||
| 15 | 1 | 5 | my $bar = Bar->new( some => q{other thing} ); | ||||
| 16 | }; | ||||||
| 17 | 1 | 5 | like $@, qr/Missing one or more required fields:/, q{Failure message for missing fields found as expected.}; | ||||
| 18 | |||||||
| 19 | 1 | 200 | done_testing; | ||||