-
-
05 Feb 2016 23:42:10 UTC
- Distribution: Test-Stream
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues (15)
- Testers (1458 / 34 / 3)
- Kwalitee
Bus factor: 7- 93.95% Coverage
- License: perl_5
- Perl: v5.8.1
- Activity
24 month- Tools
- Download (222.84KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
Deprecated.
The maintainer of this distribution has indicated that it is deprecated and no longer suitable for use.NAME
Test::Stream::Manual::ToTest2 - How to move code to Test2/Test2-Suite
DESCRIPTION
Test::Stream is deprecated in favor of Test2, Test2::Suite, and Test2::Workflow.
MAP
This section briefly tells you where to look for replacements.
THE GUTS AND INTERNALS
CONTEXT
If you used the
context()
method it can now be found in Test2::API, usage is identical. Converting from Test-Stream'scontext()
function could be as easy as changinguse Test::Stream::Context qw/context/
touse Test2::API qw/context/
.One major gotcha though is that the
debug()
attribute is gone. Instead there is atrace()
attribute, but its usage is not identical.TODO/SKIP
TODO and SKIP are no longer managed inside the Context and DebugInfo objects. Skip is now a full fledged event type
Test2::Event::Skip
, andTest2::API::Context
has added askip()
method.TODO is no longer tracked at all by the Test2 internals. Instead look at Test2::Tools::Todo and/or Test2::Todo which are both part of Test2::Suite. These tools manage TODO as a hub filter.
IPC
IPC has not changed much. Load the Test2::IPC module to make sure IPC is loaded if you need it.
CAPABILITIES
Test::Stream::Capabilities has been merged with Test::Stream::Util in Test2::Util.
EXPORTER
Test::Stream::Exporter is completely gone. Use Exporter, Export::Declare, Exporter::Declare, or Sub::Exporter.
HASHBASE
Change
use Test::Stream::HashBase( base => 'Parent::Class', accessors => [qw/foo bar baz/], );
To
use parent 'Parent::Class'; use Test2::Util::HashBase qw/foo bar baz/;
EVENTS
See Test2::Event for the new event base class. Very little has changed apart from the HashBase usage.
SYNC
Test::Stream::Sync has been replaced by Test2::API. One major difference is that Test2::API exports functions, you do not call clas methods on it the way you did with Test2::Sync. Test2::API also adds and renames several functions.
HUB AND STATE
Test::Stream::Hub and Test::Stream::State have been merged into Test2::API::Stack. Methods form both are now in a single class. Some deprecated methods were removed.
TOOLS, PLUGINS, FORMATTERS, ETC.
There is a new namespace layout.
Test::Stream::Plugin::
has been split into:- Test2::Tools::
-
Tools live here.
- Test2::Bundle::
-
Bundles live here.
- Test2::Plugin::
-
Plugins (behavior modifications) live here.
- Test2::Require::
-
Things that cause a test to skip all live here.
- Test2::Formatter::
-
Formatters live here.
-V1
Test::Stream::Bundle::V1 is now spelled Test2::Bundle::Extended.
-Classic
Test::Stream::Bundle::Classic is now spelled Test2::Bundle::Classic.
SPEC AND WORKFLOWS
All the spec and workflow stuff has moved to Test2::Workflow. This was never maked stable so I don't expect anyone to need a conversion guide.
TESTING YOUR TESTS
Test2::API now exports the
$events = intercept { ... }
function.SOURCE
The source code repository for Test::Stream can be found at http://github.com/Test-More/Test-Stream/.
MAINTAINERS
AUTHORS
COPYRIGHT
Copyright 2015 Chad Granum <exodist7@gmail.com>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://dev.perl.org/licenses/
Module Install Instructions
To install Test::Stream, copy and paste the appropriate command in to your terminal.
cpanm Test::Stream
perl -MCPAN -e shell install Test::Stream
For more information on module installation, please visit the detailed CPAN module installation guide.