Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
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); 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 (so it actually loads the right module), and as a way to document the tests for future maintainers.