Created
March 6, 2016 11:34
-
-
Save urasandesu/eb5c335098aaa244d982 to your computer and use it in GitHub Desktop.
profile.ps1 for PSUnit
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
#PSUnit: Setting up PATH environment variable to point to PSUnit framework | |
$PSUnitPath = "C:\psunit-2-beta-1-24978" #Modify this path to match your local PowerShell installation path | |
#Make sure to only append this path once | |
if (!($env:path -like "*$PSUnitPath*")) | |
{ | |
$env:path = $env:path + ";$PSUnitPath" | |
} | |
#PSUnit: Setting PSUNIT_HOME environment variable to point to PSUnit framework | |
If(! $(Test-Path -Path "env:PSUNIT_HOME")) | |
{ | |
New-Item -Path "env:" -Name "PSUNIT_HOME" -value $PSUnitPath | |
} | |
#PSUnit: Defining functions to set debug options | |
function Set-DebugMode() | |
{ | |
$Global:DebugPreference = "Continue" | |
set-strictmode -version Latest | |
} | |
function Set-ProductionMode() | |
{ | |
$Global:DebugPreference = "SilentlyContinue" | |
set-strictmode -Off | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment