File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ Describe "Settings Class" {
7979 $settings.RuleArguments [" PSAvoidUsingCmdletAliases" ][" WhiteList" ][1 ] | Should Be " cp"
8080 }
8181
82- It " Should be case insesitive " {
82+ It " Should be case insensitive " {
8383 $settings.RuleArguments [" psAvoidUsingCmdletAliases" ][" whiteList" ].Count | Should Be 2
8484 $settings.RuleArguments [" psAvoidUsingCmdletAliases" ][" whiteList" ][0 ] | Should Be " cd"
8585 $settings.RuleArguments [" psAvoidUsingCmdletAliases" ][" whiteList" ][1 ] | Should Be " cp"
@@ -93,15 +93,23 @@ Describe "Settings Class" {
9393 }
9494
9595 It " Should return 2 IncludeRules" {
96- $settings.IncludeRules.Count | Should Be 2
96+ $settings.IncludeRules.Count | Should Be 3
9797 }
9898
9999 It " Should return 2 ExcludeRules" {
100100 $settings.ExcludeRules.Count | Should Be 3
101101 }
102102
103103 It " Should return 1 rule argument" {
104- $settings.RuleArguments.Count | Should Be 1
104+ $settings.RuleArguments.Count | Should Be 2
105+ }
106+
107+ It " Should parse boolean type argument" {
108+ $settings.RuleArguments [" PSUseConsistentIndentation" ][" Enable" ] | Should Be $true
109+ }
110+
111+ It " Should parse int type argument" {
112+ $settings.RuleArguments [" PSUseConsistentIndentation" ][" IndentationSize" ] | Should Be 4
105113 }
106114 }
107115}
Original file line number Diff line number Diff line change 11@ {
2- " IncludeRules" = @ (" PSAvoidUsingCmdletAliases" , " PSAvoidUsingWriteHost" )
2+ " IncludeRules" = @ (" PSAvoidUsingCmdletAliases" , " PSAvoidUsingWriteHost" , " PSUseConsistentIndentation " )
33 " ExcludeRules" = @ (" PSShouldProcess" , " PSAvoidUsingWMICmdlet" , " PSUseCmdletCorrectly" )
44 " rules" = @ {
55 PSAvoidUsingCmdletAliases = @ {
66 WhiteList = @ (" cd" , " cp" )
77 }
8+
9+ PSUseConsistentIndentation = @ {
10+ Enable = $true
11+ IndentationSize = 4
12+ }
813 }
914}
You can’t perform that action at this time.
0 commit comments