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
# Import the stuff you'll be testing. Could be dot-sourcing a ps1 file here, importing a module, whatever you need. | |
# If importing a mdoule, make sure you've only got one copy of it imported, or weird things can happen when you start | |
# to get into mocking. | |
Remove-Module [S]omeDscResource | |
Import-Module $PSScriptRoot\SomeDscResource.psm1 | |
# All of the Pester tests in a script must go inside a Describe block; you can mave many Describe blocks in the same | |
# script, if you like. Make sure to put the opening brace on the same line as Describe, since this is just a function | |
# pretending to be a keyword; no assistance from the parser allowing us to put opening braces on their own lines. |