The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Test::Auto::Plugin

ABSTRACT

Test-Auto Plugin Class

SYNOPSIS

  package Test::Auto::Plugin::Example;

  use Test::More;

  use parent 'Test::Auto::Plugin';

  sub tests {
    my ($self, @args) = @_;

    subtest "testing example plugin", fun () {

      ok 1;
    };

    return $self;
  }

  1;

DESCRIPTION

This package provides an abstract base class for creating Test::Auto plugins.

LIBRARIES

This package uses type constraints from:

Data::Object::Library

ATTRIBUTES

This package has the following attributes:

subtests

  subtests(InstanceOf["Test::Auto::Subtests"])

This attribute is read-only, accepts (InstanceOf["Test::Auto::Subtests"]) values, and is required.

METHODS

This package implements the following methods:

tests

  tests(Any @args) : Object

This method is meant to be overridden by the superclass, and should perform specialized subtests. While not required, ideally this method should return its invocant.

tests example #1
  package main;

  use Test::Auto;
  use Test::Auto::Parser;
  use Test::Auto::Subtests;

  my $test = Test::Auto->new(
    't/Test_Auto_Plugin.t'
  );

  my $parser = Test::Auto::Parser->new(
    source => $test
  );

  my $subtests = Test::Auto::Subtests->new(
    parser => $parser
  );

  # Test::Auto::Plugin::ShortDescription
  my $example = $subtests->plugin('ShortDescription');

  $example->tests(length => 200);

AUTHOR

Al Newkirk, awncorp@cpan.org

LICENSE

Copyright (C) 2011-2019, Al Newkirk, et al.

This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file".

PROJECT

Wiki

Project

Initiatives

Milestones

Issues