Skip to content

Commit a5e2753

Browse files
committed
Example() now takes a pod-content field
1 parent 0e99059 commit a5e2753

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/Perl6/Example.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class Example is export {
1010
has $.subcategory is rw;
1111
has $.filename is rw;
1212
has $.pod-link is rw;
13+
has $.pod-contents is rw;
1314
}
1415

1516
# vim: expandtab shiftwidth=4 ft=perl6

t/001-example-basic.t

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ subtest {
2020
subcategory => "",
2121
filename => "",
2222
pod-link => "",
23+
pod-contents => "",
2324
);
2425
ok($example, "Instantiation setting all attributes");
2526
}, "Object instantiation";
2627

2728
subtest {
28-
plan 6;
29+
plan 7;
2930

3031
my $example = Example.new;
3132
$example.title = "my title";
@@ -46,6 +47,9 @@ subtest {
4647
$example.pod-link = "/just/a/plain/link.html";
4748
is($example.pod-link, "/just/a/plain/link.html", "Can set pod-link attribute");
4849

50+
$example.pod-contents = Pod::Block.new;
51+
ok($example.pod-contents ~~ Pod::Block, "pod-contents is a Pod::Block");
52+
4953
}, "Attribute setting";
5054

5155
# vim: expandtab shiftwidth=4 ft=perl6

0 commit comments

Comments
 (0)