RMock/AtLeastConstraint.pm

filter: Statementstmt 100% 7 / 7 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 0.0% 0 / 3 totaltotal 73.3% 11 / 15 CC 2 SCAR 4.3
CC
2
Cov
89%
error_message
2.1
new
1.0
call
1.0
CRAP 1.5
« RMock/ExactlyConstraint.pm ↑ Summary RMock/MessageExpectation.pm »
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
BranchTrueFalseTotal
$times_called == 1 ? : 0 2 2
16 $name, $mock_name, $times_called, ($times_called == 1 ? 'time' : 'times');
17 }
18  
19 1 1;
20  
21 __END__
« RMock/ExactlyConstraint.pm ↑ Summary RMock/MessageExpectation.pm »