Kwiki::Test

Kwiki::Test is a helper module for testing Kwiki Plugins.
Download

Kwiki::Test Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Chris Dent
  • Publisher web site:
  • http://search.cpan.org/~cdent/Kwiki-Test-0.03/lib/Kwiki/Test.pm

Kwiki::Test Tags


Kwiki::Test Description

Kwiki::Test is a helper module for testing Kwiki Plugins. Kwiki::Test is a helper module for testing Kwiki Plugins.SYNOPSIS use strict; use warnings; use IO::All; use Kwiki::Test; use Test::More tests => 6; my $REGISTRY_FILE = 'registry.dd'; my $CONFIG_FILE = 'config.yaml'; my $CONFIG_DIR = 'config'; my $TEMPLATE_DIR = 'template'; my $CSS_DIR = 'css'; my $HOME_PAGE = 'database/HomePage'; my $kwiki = Kwiki::Test->new->init; ok($kwiki->exists_as_file($REGISTRY_FILE), "$REGISTRY_FILE exists"); ok($kwiki->exists_as_file($CONFIG_FILE), "$CONFIG_FILE exists"); ok($kwiki->exists_as_dir($TEMPLATE_DIR), "$TEMPLATE_DIR exists"); ok($kwiki->exists_as_dir($CONFIG_DIR), "$CONFIG_DIR exists"); ok($kwiki->exists_as_dir($CSS_DIR), "$CSS_DIR exists"); ok($kwiki->exists_as_file($HOME_PAGE), "$HOME_PAGE exists"); $kwiki->cleanup;Because of the way templates and other files are handled in kwiki it can often be a bit painful to write useful tests for Kwiki plugins. Kwiki::Test creates a kwiki installation in your modules build directory against which tests can be run.The tests included in the distribution are the best examples of how to use the system.Of special note: if you pass a reference to a list containing plugin modules to init() those modules will be added to the kwiki test configuration.cleanup() removes the mess you've made. This may be moved into DESTROY in the future. Requirements: · Perl


Kwiki::Test Related Software