File: tester-local-plugins.t

package info (click to toggle)
libdist-zilla-perl 6.032-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,928 kB
  • sloc: perl: 7,275; makefile: 4; sh: 1
file content (39 lines) | stat: -rw-r--r-- 753 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
use strict;
use warnings;

use Test::More 0.88;
use Dist::Zilla::Tester;
use Test::DZil;
use Test::Fatal;

my $tzil;
is(
  exception {
    $tzil = Builder->from_config(
      { dist_root => 'does-not-exist' },
      {
        add_files => {
          'source/dist.ini' => simple_ini(
            [ GatherDir => ],
            [ MetaJSON => ],
            [ '=inc::MyMetadata' ],
          ),
          'source/inc/MyMetadata.pm' => <<PLUGIN
package inc::MyMetadata;
use Moose;
with 'Dist::Zilla::Role::MetaProvider';
sub metadata { +{} }
1;
PLUGIN
        },
      },
    );

    $tzil->chrome->logger->set_debug(1);
    $tzil->build;
  },
  undef,
  q{config does not blow up with "Required plugin inc::MyMetadata isn't installed."},
);

done_testing;