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

« back to all changes in this revision

Viewing changes to t/object.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
 
 
3
package MyTest;
 
4
use Test::Roo;
 
5
 
 
6
has fixture => (
 
7
    is      => 'ro',
 
8
    default => sub { "hello world" },
 
9
);
 
10
 
 
11
test try_me => sub {
 
12
    my $self = shift;
 
13
    like( $self->fixture, qr/hello world/, "saw fixture" );
 
14
};
 
15
 
 
16
package main;
 
17
use strictures;
 
18
use Test::More;
 
19
 
 
20
my $obj = MyTest->new;
 
21
$obj->run_tests;
 
22
$obj->run_tests("with description");
 
23
 
 
24
done_testing;
 
25
#
 
26
# This file is part of Test-Roo
 
27
#
 
28
# This software is Copyright (c) 2013 by David Golden.
 
29
#
 
30
# This is free software, licensed under:
 
31
#
 
32
#   The Apache License, Version 2.0, January 2004
 
33
#
 
34
# vim: ts=4 sts=4 sw=4 et: