Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: cd8d95a416
Fetching contributors…

Cannot retrieve contributors at this time

file 21 lines (17 sloc) 0.377 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#!perl -w
use strict;
use Test::More;

use Sub::Spy;
use Sub::Spy::Call;

subtest("new", sub {
    my $call = Sub::Spy::Call->new(+{
        args => [1, 2, 3],
        exception => "die",
        return_value => 1,
    });

    is_deeply( $call->args, [1, 2, 3] );
    is( $call->exception, "die" );
    is( $call->return_value, 1 );
    ok( $call->threw );
});

done_testing;
Something went wrong with that request. Please try again.