I'm new to testing. I've got a test that uses a call to a private method like so:
# Check that module loads data my $xyz_events = $checker->_get_event_data('arg'); my $is_hash_ref = ref $xyz_events eq 'HASH'; is $is_hash_ref, 1, 'returns a hash ref';
I'm thinking it's OK to break the rules a bit since I'm just running tests. It also seems like it makes writing tests easier by testing small components of the module. But I worry it's a sign that I'm going about testing in the wrong way. What is the opinion of the wiser Monks about this?
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks
In reply to Testing private methods a no-no? by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |