File: 03-basic-dztest-createplugin.t

package info (click to toggle)
libdist-zilla-util-test-kentnl-perl 1.005014-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 340 kB
  • sloc: perl: 595; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 599 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use strict;
use warnings;

use Test::More;
use Test::DZil qw( simple_ini );
use Dist::Zilla::Util::Test::KENTNL qw( dztest );

# ABSTRACT: Make sure dztest's create_plugin works

my $test = dztest;
$test->add_file( 'dist.ini', simple_ini( ['GatherDir'] ) );

my $plugin_a = $test->create_plugin('MetaConfig');
my $plugin_b = $test->create_plugin( 'MetaConfig', 'Lizzard' );
my $plugin_c = $test->create_plugin( 'MetaConfig', {} );
my $plugin_d = $test->create_plugin( 'MetaConfig', 'Lizzard', {} );

is( ref $plugin_a->metadata, 'HASH', 'Constructed metaconfig returned a hash ;)' );

done_testing;