Tests/GenXdev.Console.Spotify/Set-SpotifyRepeatOff.Tests.ps1
################################################################################ Describe "Set-SpotifyRepeatOff" { It "should pass PSScriptAnalyzer rules" { # get the script path for analysis $scriptPath = GenXdev.FileSystem\Expand-Path "$PSScriptRoot\..\..\Functions\GenXdev.Console.Spotify\Set-SpotifyRepeatOff.ps1" $analyzerResults = GenXdev.Coding\Invoke-GenXdevScriptAnalyzer ` -Path $scriptPath [string] $message = "" $analyzerResults | ForEach-Object { $message = $message + @" -------------------------------------------------- Rule: $($_.RuleName)` Description: $($_.Description) Message: $($_.Message) `r`n "@ } $analyzerResults.Count | Should -Be 0 -Because @" The following PSScriptAnalyzer rules are being violated: $message "@; } } ################################################################################ |