Created
September 30, 2018 07:13
-
-
Save SQLDBAWithABeard/25c0305bcce47057a85f6bc12a9ec613 to your computer and use it in GitHub Desktop.
testiong examples code
This file contains hidden or 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
$Function = 'Get-DbcCheck' | |
Describe "$Function" { | |
Context "Checking $Function Examples" { | |
$Examples = Get-Help $Function -Examples | |
foreach ($examplecode in $Examples.examples.example.Code) { | |
It "Example Code $examplecode should not throw" { | |
{$examplecode} | Should -Not -Throw | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment