Skip to content

Commit 01e1432

Browse files
author
Kapil Borle
committed
Modify rule suppression test for dsc configuration
1 parent 4f3ecc6 commit 01e1432

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Tests/Engine/RuleSuppression.tests.ps1

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,13 @@ Describe "RuleSuppressionWithoutScope" {
5858
}
5959
}
6060

61-
Context "Rule suppression within DSC Configuration definition" {
62-
It "Suppresses rule" {
63-
$suppressedRule = Invoke-ScriptAnalyzer -ScriptDefinition $ruleSuppressionInConfiguration -SuppressedOnly
64-
$suppressedRule.Count | Should Be 1
61+
if (($PSVersionTable.PSVersion -ge [Version]'5.0'))
62+
{
63+
Context "Rule suppression within DSC Configuration definition" {
64+
It "Suppresses rule" {
65+
$suppressedRule = Invoke-ScriptAnalyzer -ScriptDefinition $ruleSuppressionInConfiguration -SuppressedOnly
66+
$suppressedRule.Count | Should Be 1
67+
}
6568
}
6669
}
6770

0 commit comments

Comments
 (0)