Web::Library::Test - Test helpers for distributino wrappes
use Web::Library::Test qw(:all); library_ok( name => 'DataTables', version => '1.9.4', css_assets => ['/css/datatables.css'], javascript_assets => ['/js/jquery.dataTables.min.js'] );
The functions provided by this module make testing distribution wrappers easier.
Returns the Web::Library instance object.
Takes named parameters name, version, css_assets and javascript_assets as shown in the synopsis and calls include_path_ok(), css_assets_ok() and javascript_assets_ok() using those values.
name
version
css_assets
javascript_assets
include_path_ok()
css_assets_ok()
javascript_assets_ok()
Takes a version number and verifies first that the manager's include_paths() method only returns one path and second that the path points to a directory with the version name underneath the calling test program's distribution root directory.
include_paths()
Takes a library name and a reference to a list of CSS assets and verifies first that these are the assets returned by the manager's css_assets_for() method and second that these files also exist.
css_assets_for()
Takes a library name and a reference to a list of JavaScript assets and verifies first that these are the assets returned by the manager's javascript_assets_for() method and second that these files also exist.
javascript_assets_for()
To install Web::Library, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Web::Library
CPAN shell
perl -MCPAN -e shell install Web::Library
For more information on module installation, please visit the detailed CPAN module installation guide.