]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
xt/solver: use `psgi' shortcut for require_mods()
authorEric Wong <e@80x24.org>
Mon, 30 Sep 2024 21:30:07 +0000 (21:30 +0000)
committerEric Wong <e@80x24.org>
Wed, 2 Oct 2024 17:40:35 +0000 (17:40 +0000)
The `psgi' shortcut simplifies setup, reduces the likelyhood
of human error from omitted modules, and avoid needless `use_ok'
tests which make the output noisier than necessary.

xt/solver.t

index 372d003b297c4e67add17d73b8d69f3e33400046..d074b1b52d95aeecf9d65d7dbcfa82be2f9428ee 100644 (file)
@@ -4,9 +4,7 @@
 use v5.12;
 use PublicInbox::TestCommon;
 use PublicInbox::Config; # this relies on PI_CONFIG // ~/.public-inbox/config
-my @psgi = qw(HTTP::Request::Common Plack::Test URI::Escape Plack::Builder);
-require_mods(qw(DBD::SQLite Xapian), @psgi);
-use_ok($_) for @psgi;
+require_mods qw(DBD::SQLite Xapian psgi);
 use_ok 'PublicInbox::WWW';
 my $cfg = PublicInbox::Config->new;
 my $www = PublicInbox::WWW->new($cfg);