-
-
Save bielawb/bd0f5432e786b4107a2f9c502bb9fc6d to your computer and use it in GitHub Desktop.
Maskujemy Write-Host tylko jeśli...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Describe 'Nadpisujemy Write-Host' { | |
Mock -CommandName Write-Host -MockWith { | |
Write-Warning -Message $Object | |
} -ParameterFilter { | |
$Object -match '^Nadpisz' | |
} | |
Write-Host -Object 'Nie nadpisuj...' | |
Write-Host -Object 'Nadpisz mnie!' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment