Skip to content

Commit 9d3daab

Browse files
author
Kapil Borle
committed
Fix failing test
1 parent 22e639f commit 9d3daab

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Tests/Rules/AvoidUsingAlias.tests.ps1

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
Import-Module PSScriptAnalyzer
2-
$violationMessage = "'cls' is an alias of 'Clear-Host'. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content."
1+
$violationMessage = "'cls' is an alias of 'Clear-Host'. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content."
32
$violationName = "PSAvoidUsingCmdletAliases"
43
$directory = Split-Path -Parent $MyInvocation.MyCommand.Path
4+
$testRootDirectory = Split-Path -Parent $directory
55
$violationFilepath = Join-Path $directory 'AvoidUsingAlias.ps1'
66
$violations = Invoke-ScriptAnalyzer $violationFilepath | Where-Object {$_.RuleName -eq $violationName}
77
$noViolations = Invoke-ScriptAnalyzer $directory\AvoidUsingAliasNoViolations.ps1 | Where-Object {$_.RuleName -eq $violationName}
8-
Import-Module (Join-Path $directory "PSScriptAnalyzerTestHelper.psm1")
8+
9+
Import-Module PSScriptAnalyzer
10+
Import-Module (Join-Path $testRootDirectory "PSScriptAnalyzerTestHelper.psm1")
911

1012
Describe "AvoidUsingAlias" {
1113
Context "When there are violations" {

0 commit comments

Comments
 (0)