| 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 | 24 24 24 | 55 15 55 | use parent 'Test::Mocha::CalledOk'; | ||||
| 5 | 24 24 24 | 712 20 309 | use strict; | ||||
| 6 | 24 24 24 | 49 22 1482 | use warnings; | ||||
| 7 | |||||||
| 8 | sub is { | ||||||
| 9 | # uncoverable pod | ||||||
| 10 | 10 | 0 | 6 | my ( $class, $got, $exp ) = @_; | |||
| 11 | 10 | 93 | return $exp->[0] <= $got && $got <= $exp->[1]; | ||||
| 12 | } | ||||||
| 13 | |||||||
| 14 | sub stringify { | ||||||
| 15 | # uncoverable pod | ||||||
| 16 | 10 | 0 | 8 | my ( $class, $exp ) = @_; | |||
| 17 | 10 | 22 | return "between $exp->[0] and $exp->[1] time(s)"; | ||||
| 18 | } | ||||||
| 19 | |||||||
| 20 | 1; | ||||||