On Tue, Apr 24, 2012 at 12:35 AM, Jed Lund <jandrewl...@gmail.com> wrote:
> I understand that this is a fairly basic question but I am stuck trying to
> find the right path forward.

It's not entirely basic, because you're testing an array of three
"outputs" for each functionality test instead of just one.

I'd probably use Capture::Tiny:

    use Capture::Tiny qw/capture/;

    my ($out, $err, $result) = capture { your_code_here };
    # then test $out, $err, $result however you want

If that's repetitive, stick it in a loop or write a function to
abstract testing the three results against your expectations.

-- David

Reply via email to