@@ -4,28 +4,14 @@ use PerlUsersJP::Builder;
4
4
use Path::Tiny qw( path) ;
5
5
6
6
my $builder = PerlUsersJP::Builder-> new(
7
- src_dir => ' ./src ' ,
8
- docs_dir => ' ./docs ' ,
7
+ content_dir => ' ./content ' ,
8
+ public_dir => ' ./public ' ,
9
9
layouts_dir => ' ./layouts' ,
10
10
);
11
11
12
- subtest ' dest_dir' => sub {
13
- is $builder -> dest_dir(path(' src/foo/bar/text.md' )), ' docs/foo/bar' ;
14
- is $builder -> dest_dir(path(' src/index.md' )), ' docs' ;
15
- };
16
-
17
- subtest ' is_entry' => sub {
18
- ok $builder -> is_entry(path(' src/foo/bar/text.md' ));
19
- ok $builder -> is_entry(path(' src/foo/bar/text.markdown' ));
20
- ok $builder -> is_entry(path(' src/foo/bar/text.txt' ));
21
- ok !$builder -> is_entry(path(' src/foo/bar/text.css' ));
22
- };
23
-
24
- subtest ' detect_format' => sub {
25
- is $builder -> detect_format(path(' src/foo/bar/text.md' )), ' markdown' ;
26
- is $builder -> detect_format(path(' src/foo/bar/text.markdown' )), ' markdown' ;
27
- is $builder -> detect_format(path(' src/foo/bar/text.txt' )), ' hatena' ;
28
- is $builder -> detect_format(path(' src/foo/bar/text.css' )), undef ;
12
+ subtest ' to_public' => sub {
13
+ is $builder -> to_public(path(' content/foo/bar/text.md' )), ' public/foo/bar/text.md' ;
14
+ is $builder -> to_public(path(' content/index.md' )), ' public/index.md' ;
29
15
};
30
16
31
17
0 commit comments