| 1 | package Test::Spec::RMock::AtLeastConstraint; | ||||||||||
| 2 | |||||||||||
| 3 | 3 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 4 | 3 | my ($class, $bound) = @_; | |||||||||
| 5 | 3 | bless { _bound => $bound }, $class; | |||||||||
| 6 | } | ||||||||||
| 7 | |||||||||||
| 8 | 9 | ▶ | sub call { | ||||||||
|
Subroutine
call: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 9 | 9 | my ($self, $times_called) = @_; | |||||||||
| 10 | 9 | $times_called >= $self->{_bound}; | |||||||||
| 11 | } | ||||||||||
| 12 | |||||||||||
| 13 | 2 | ▶ | sub error_message { | ||||||||
|
Subroutine
error_message: called CC=2 SCAR=7.2
Pod
undocumented
| |||||||||||
| 14 | 2 | my ($self, $mock_name, $name, $times_called) = @_; | |||||||||
| 15 | 2 | ▶ | sprintf "Expected '%s' to be called at least once on '%s', but called %d %s.", | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | $name, $mock_name, $times_called, ($times_called == 1 ? 'time' : 'times'); | ||||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | 1 | 1; | |||||||||
| 20 | |||||||||||
| 21 | __END__ | ||||||||||