4 ms·
on the other hand my $thing = $thingloader->new($some_complex_data); ok ($thing->isa('Specific::Kind::Of::Thing') is fine and useful.
by singingfish 13y ago
on the other hand
my $thing = $thingloader->new($some_complex_data);
ok ($thing->isa('Specific::Kind::Of::Thing')
is fine and useful.
- ddebernardy 13y agoDoubtful. That should be using dependency injection. At the very most you should be expecting an interface, and not having the correct one should yield a runtime error within the code to begin with.
- emddudley 13y agoIt would be a useful test for a dependency injection framework ;-)
- singingfish 13y agoThat's what it is. You have a unified interface for generating things, and you need to have deterministic test to make sure your thing is being generated correctly and the data generates the thing fully and correctly.