File tree Expand file tree Collapse file tree 1 file changed +17
-14
lines changed Expand file tree Collapse file tree 1 file changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -21,22 +21,25 @@ Describe "UseSingularNouns" {
21
21
$nounViolations [0 ].Message | Should Match $nounViolationMessage
22
22
}
23
23
24
- It " has the correct extent" {
25
- $nounViolations [0 ].Extent.Text | Should be " Verb-Files"
26
- }
27
-
28
- It " excludes items from noun whitelist" {
29
- $nounViolationScript = @'
30
- Function Add-SomeData
31
- {
32
- Write-Output "Adding some data"
24
+ It " has the correct extent" {
25
+ $nounViolations [0 ].Extent.Text | Should be " Verb-Files"
33
26
}
34
- '@
35
- Invoke-ScriptAnalyzer - ScriptDefinition $nounViolationScript `
36
- - IncludeRule " PSUseSingularNouns" `
37
- - OutVariable violations
38
- $violations.Count | Should Be 0
39
27
}
28
+
29
+ Context " When function names have nouns from whitelist" {
30
+
31
+ It " ignores function name ending with Data" {
32
+ $nounViolationScript = @'
33
+ Function Add-SomeData
34
+ {
35
+ Write-Output "Adding some data"
36
+ }
37
+ '@
38
+ Invoke-ScriptAnalyzer - ScriptDefinition $nounViolationScript `
39
+ - IncludeRule " PSUseSingularNouns" `
40
+ - OutVariable violations
41
+ $violations.Count | Should Be 0
42
+ }
40
43
}
41
44
42
45
Context " When there are no violations" {
You can’t perform that action at this time.
0 commit comments