GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  TEST::MINI (3)

.ds Aq ’

NAME

Test::Mini - Lightweight xUnit Testing for Perl

CONTENTS

DESCRIPTION

Test::Mini is a light, spry testing framework built to bring the familiarity of an xUnit testing framework to Perl as a first-class citizen. Based initially on Ryan Davis’ minitest, it provides a not only a simple way to write and run tests, but the necessary infrastructure for more expressive test fromeworks to be written.

Since example code speaks louder than words:



  package t::Test
  use base Test::Mini::TestCase;
  use strict;
  use warnings;

  # This will run before each test
  sub setup { ... }

  # This will run after each test
  sub teardown { ... }

  sub test_something {
      my $self = shift;
      $self->assert(1); # Assertions come from Test::Mini::Assertions
  }

  # Assertions can also be imported...
  use Test::Mini::Assertions;

  sub helper { return 1 }

  sub test_something_else {
      assert(helper());
  }



Like any traditional xUnit framework, any method whose name begins with ’test’ will be automatically run. If you’ve declared ’setup’ or ’teardown’ methods, they will be run before or after each test.

See Also:
o http://blog.zenspider.com/minitest
o Test::Mini::Runner

METHODS

    Class Methods

<B>runner_classB>


    runner_class # => Class



The test runner class to use.

Returns:
o (Class) — The test runner class to use.

AUTHOR

Pieter van de Bruggen <pvande@cpan.org>
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 TEST::MINI (3) 2011-02-13

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.