We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97d77a9 commit 3c44cf4Copy full SHA for 3c44cf4
Tests/Rules/UseCompatibleCmdlets.tests.ps1
@@ -26,9 +26,11 @@ Describe "UseCompatibleCmdlets" {
26
process
27
{
28
It ("found {0} violations for '{1}'" -f $expectedViolations, $command) {
29
- Invoke-ScriptAnalyzer -ScriptDefinition $command -IncludeRule $ruleName -Settings $settings | `
30
- Get-Count | `
31
- Should -Be $expectedViolations
+ $warnings = Invoke-ScriptAnalyzer -ScriptDefinition $command -IncludeRule $ruleName -Settings $settings
+ $warnings.Count | Should -Be $expectedViolations
+ $warnings | ForEach-Object {
32
+ $_.RuleName | Should -Be 'PSUseCompatibleCmdlets'
33
+ }
34
}
35
36
0 commit comments