File Coverage: blib/lib/Test/Mocha/CalledOk/Between.pm

# File Coverage

File: | blib/lib/Test/Mocha/CalledOk/Between.pm
Coverage: | 100.0%

line | stmt | bran | cond | sub | pod | time | code
--- | --- | --- | --- | --- | --- | --- | ---
1 |  |  |  |  |  |  | package Test::Mocha::CalledOk::Between;
2 |  |  |  |  |  |  | # ABSTRACT: Concrete subclass of CalledOk for verifying methods called 'between' a min and max number of times
3 |  |  |  |  |  |  | $Test::Mocha::CalledOk::Between::VERSION = '0.61';
4 | 12 12 12 |  |  | 12 |  | 29 5 29 | use parent 'Test::Mocha::CalledOk';
5 | 12 12 12 |  |  | 12 |  | 354 10 155 | use strict;
6 | 12 12 12 |  |  | 12 |  | 26 9 731 | use warnings;
7 |
8 |  |  |  |  |  |  | sub is {
9 |  |  |  |  |  |  | # uncoverable pod
10 | 5 |  |  | 5 | 0 | 3 | my ( $class, $got, $exp ) = @_;
11 | 5 |  | 100 |  |  | 44 | return $exp->[0] <= $got && $got <= $exp->[1];
12 |  |  |  |  |  |  | }
13 |
14 |  |  |  |  |  |  | sub stringify {
15 |  |  |  |  |  |  | # uncoverable pod
16 | 5 |  |  | 5 | 0 | 4 | my ( $class, $exp ) = @_;
17 | 5 |  |  |  |  | 11 | return "between $exp->[0] and $exp->[1] time(s)";
18 |  |  |  |  |  |  | }
19 |
20 |  |  |  |  |  |  | 1;