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

« back to all changes in this revision

Viewing changes to examples/synopsis/t/test.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 Test::Roo; # loads Moo and Test::More
 
2
use lib 't/lib';
 
3
 
 
4
# provide the fixture
 
5
has class => (
 
6
    is      => 'ro',
 
7
    default => sub { "Digest::MD5" },
 
8
);
 
9
 
 
10
# specify behaviors to test 
 
11
with 'ObjectCreation';
 
12
 
 
13
# give our subtests a label
 
14
sub _build_description { "Testing " . shift->class }
 
15
 
 
16
# run the tests
 
17
run_me;
 
18
run_me( { class => "Digest::SHA1" } );
 
19
 
 
20
done_testing;