~ubuntu-branches/ubuntu/trusty/libtest-roo-perl/trusty-proposed

« back to all changes in this revision

Viewing changes to t/test-more-args.t

  • Committer: Package Import Robot
  • Author(s): gregor herrmann
  • Date: 2014-01-14 19:25:11 UTC
  • Revision ID: package-import@ubuntu.com-20140114192511-9ycl4dc1zgamfnek
Tags: upstream-1.002
ImportĀ upstreamĀ versionĀ 1.002

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
use 5.008001;
 
2
use Test::Roo import => [qw/like done_testing/];
 
3
 
 
4
has fixture => (
 
5
    is      => 'ro',
 
6
    default => sub { "hello world" },
 
7
);
 
8
 
 
9
test try_me => sub {
 
10
    my $self = shift;
 
11
    like( $self->fixture, qr/hello world/, "saw fixture" );
 
12
    eval { fail("fail() called") };
 
13
    like( $@, qr/undefined subroutine/i, "Not all Test::More functions imported" );
 
14
};
 
15
 
 
16
run_me;
 
17
done_testing;
 
18
#
 
19
# This file is part of Test-Roo
 
20
#
 
21
# This software is Copyright (c) 2013 by David Golden.
 
22
#
 
23
# This is free software, licensed under:
 
24
#
 
25
#   The Apache License, Version 2.0, January 2004
 
26
#
 
27
# vim: ts=4 sts=4 sw=4 et: