NAME

mocked - use mocked libraries in unit tests

SYNOPSIS

# use a fake LWP::Simple for testing from t/lib/LWP/Simple.pm
use mocked 'LWP::Simple';
my $text = get($url);

DESCRIPTION

Often during unit testing, you may find the need to use mocked libraries to test edge cases, or prevent unit tests from using slow or external code.

This is where mocking libraries can help.

When you mock a library, you are creating a fake one that will be used in place of the real one. The code can do as much or as little as is needed.

Use mocked.pm as a safety measure (be sure you're actually using the mocked module), and as a way to document the tests for future maintainers.

FUNCTIONS

import

This function will make sure the module you specify is loaded from t/lib.

AUTHOR

Luke Closs, <cpan at 5thplane.com>

MAD CREDS TO

Ingy döt ne, for only.pm

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 65:

Non-ASCII character seen before =encoding in 'döt'. Assuming UTF-8