Skip to content

Commit dce2c37

Browse files
committed
Add test dependencies to build file
1 parent c664eb1 commit dce2c37

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

Build.PL

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ my %config = (
178178
'Test::More' => 0,
179179
'File::chdir' => 0,
180180
},
181+
test_requires => {
182+
'File::chdir' => 0,
183+
'Test::Differences' => 0,
184+
},
181185
requires => {
182186
'perl' => '5.008',
183187
'File::Slurp' => 0,

t/99_sass_specs.t

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,22 @@ BEGIN
4343

4444
}
4545

46+
use Test::More;
47+
48+
if (eval { require Test::Differences; 1 })
49+
{
50+
plan(tests => 1 + @tests);
51+
}
52+
else
53+
{
54+
plan(skip_all => 'Test::Differences not installed');
55+
}
56+
57+
use_ok('Test::Differences');
58+
4659
# uncomment to debug a single test case
4760
# @tests = grep { $_->[0] =~ m/199/ } @tests;
4861

49-
use Test::More tests => scalar @tests;
50-
use Test::Differences;
51-
5262
use CSS::Sass;
5363

5464
sub read_file

0 commit comments

Comments
 (0)