Coder Social home page Coder Social logo

test-arrow's Introduction

This is Perl module Test::Arrow. It's Object-Oriented testing library.

SYNOPSIS

use Test::Arrow;

my $arr = Test::Arrow->new;

$arr->got(1)->ok;

$arr->expect(uc 'foo')->to_be('FOO');

$arr->name('Test Name')
    ->expected('FOO')
    ->got(uc 'foo')
    ->is;

$arr->expected(6)
    ->got(2 * 3)
    ->is_num;

$arr->expected(qr/^ab/)
    ->got('abc')
    ->like;

$arr->warnings(sub { warn 'Bar' })->catch(qr/^Ba/);
$arr->throw(sub { die 'Baz' })->catch(qr/^Ba/);

done;

The function t is exported as a shortcut for constructor. It initializes an instance for each.

use Test::Arrow;

t->got(1)->ok;

t->expect(uc 'foo')->to_be('FOO');

done;

INSTALLATION

Test::Arrow installation is straightforward. If your CPAN shell is set up, you should just be able to do

% cpan Test::Arrow

Download it, unpack it, then build it as per the usual:

% perl Makefile.PL
% make && make test

Then install it:

% make install

DOCUMENTATION

Test::Arrow documentation is available as in POD. So you can do:

% perldoc Test::Arrow

REPOSITORY

Test::Arrow is hosted on github http://github.com/bayashi/Test-Arrow

LICENSE

Test::Arrow is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0. (Note that, unlike the Artistic License 1.0, version 2.0 is GPL compatible by itself, hence there is no benefit to having an Artistic 2.0 / GPL disjunction.) See the file LICENSE for details.

AUTHOR

Dai Okabayashi <[email protected]>

test-arrow's People

Contributors

bayashi avatar rabbiveesh avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.