NAME
Socialtext::WikiFixture - Base class for tests specified on a wiki page
SYNOPSIS
use base 'Socialtext::WikiFixture';
DESCRIPTION
Socialtext::WikiFixture is a base class that fetches and parses wiki pages using the Socialtext::Resting REST API. It then tries to execute the commands in the wiki tables. The code for executing the tables should be implemented in subclasses.
This package assumes that tests will be defined in top level tables on the specified wiki page.
FUNCTIONS
new( %opts )
Create a new fixture object. You probably mean to call this on a subclass.
init()
Optional initialization hook for subclasses. Called from new().
run_test_table( $table_ref )
Run the commands contained in the supplied table. The table will be an array ref of array refs.
end_hook()
Optional hook for subclasses that will be called after the tests in the table have been run.
handle_command( @row )
Run the command. Subclasses can override this.
setup_table_variables
Called by init() during object creation. Use it to set variables usable by commands in the wiki test tables.
quote_as_regex( $option )
Will convert an option to a regex. If qr// is around the option text, the regex will not be escaped. Be careful with your regexes.
include( $page_name )
Include the wiki test table from $page_name into the current table.
It's kind of like a subroutine call.
set( $name, $value )
Stores a variable for later use.
set_default( $name, $value )
Stores a variable for later use, but only if it is not already set.
comment( $comment )
Prints $comment to test output.
AUTHOR
Luke Closs, <luke.closs at socialtext.com>
BUGS
Please report any bugs or feature requests to bug-socialtext-editpage at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Socialtext-WikiTest. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Socialtext::WikiFixture
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Socialtext-WikiTest
Search CPAN
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
Copyright 2006 Luke Closs, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.