From f538802da4fab7866ddd0fc188eaabb163eba487 Mon Sep 17 00:00:00 2001 From: OCram85 Date: Thu, 8 Mar 2018 10:57:21 +0100 Subject: [PATCH] add helper function for pester --- src/Helper/Get-ModuleBase.ps1 | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/Helper/Get-ModuleBase.ps1 diff --git a/src/Helper/Get-ModuleBase.ps1 b/src/Helper/Get-ModuleBase.ps1 new file mode 100644 index 0000000..118dfeb --- /dev/null +++ b/src/Helper/Get-ModuleBase.ps1 @@ -0,0 +1,29 @@ +function Get-ModuleBase { + <# + .SYNOPSIS + Returns the base path of the current module. + + .DESCRIPTION + This is just a wrapper for enabling pester tests. + + + .OUTPUTS + Returns the base path as string + + .NOTES + File Name : Get-ModuleBase.ps1 + Author : Marco Blessing - marco.blessing@googlemail.com + Requires : + + .LINK + https://github.com/OCram85/PSCredentialStore +#> + [CmdletBinding()] + [OutputType()] + param() + begin {} + process { + return $MyInvocation.MyCommand.Module.ModuleBase + } + end {} +}