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 | 44 44 44 | 105 34 806 | use strict; | ||||
5 | 44 44 44 | 97 36 548 | use warnings; | ||||
6 | 44 44 44 | 88 30 98 | use parent 'Test::Mocha::CalledOk'; | ||||
7 | |||||||
8 | sub is { | ||||||
9 | # uncoverable pod | ||||||
10 | 20 | 0 | 19 | my ( $class, $got, $exp ) = @_; | |||
11 | 20 | 52 | return $exp->[0] <= $got && $got <= $exp->[1]; | ||||
12 | } | ||||||
13 | |||||||
14 | sub stringify { | ||||||
15 | # uncoverable pod | ||||||
16 | 20 | 0 | 13 | my ( $class, $exp ) = @_; | |||
17 | 20 | 44 | return "between $exp->[0] and $exp->[1] time(s)"; | ||||
18 | } | ||||||
19 | |||||||
20 | 1; |