Marcel Grünauer > Web-Library-0.02 > Web::Library::Test

Download:
Web-Library-0.02.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Source   Latest Release: Web-Library-0.06

NAME ^

Web::Library::Test - Test helpers for distributino wrappes

SYNOPSIS ^

    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']
    );

DESCRIPTION ^

The functions provided by this module make testing distribution wrappers easier.

FUNCTIONS ^

get_manager

Returns the Web::Library instance object.

library_ok

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.

include_path_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.

css_assets_ok

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.

javascript_assets_ok

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.

syntax highlighting: