You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AboutCmdletVerbs.Koans.ps1
Line 25: $FilePath = "$env:TMP/YOUR_PATH.txt"
This works to find the path all the way until the last assertion
Context "The Problematic Assertions"
$Message = "Cannot find path '$FilePath' because it does not exist."
{ Remove-Item -Path $FilePath -ErrorAction Stop } | Should -Throw -ExpectedMessage $Message
Context "Your Attempts"
The answers you seek...
Expected an exception, with message 'Cannot find path
'C:\Users\David\AppData\Local\Temp**/**YOUR_PATH.txt' because it does not exist.' to be
thrown, but the message was 'Cannot find path
'C:\Users\David\AppData\Local\Temp**\**YOUR_PATH.txt' because it does not exist.'. from
C:\Users\David\PSKoans\Introduction\AboutCmdletVerbs.Koans.ps1:286 char:15
+ { Remove-Item -Path $FilePath -ErrorAction Stop } | Shoul ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Context "Additional Information"
My local Environment:
PowerShell Module Paths
C:\Users\David\Documents\WindowsPowerShell\Modules
C:\Program Files\WindowsPowerShell\Modules
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
PowerShell Version Table
Name Value
---------
PSVersion 5.1.19041.1023
PSEdition Desktop
PSCompatibleVersions {1.0,2.0,3.0,4.0...}
BuildVersion 10.0.19041.1023
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
PowerShell Host
Name : ConsoleHost
Version : 5.1.19041.1023
InstanceId : 3d2266c5-f8cb-40e4-8275-45dd17603f04
UI : System.Management.Automation.Internal.Host.InternalHostUserInterfa
ce
CurrentCulture : en-GB
CurrentUICulture : en-GB
PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled : True
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspace
Installed NET Frameworks
PSChildName Version Release
-------------------------
v2.0.507272.0.50727.4927
v3.03.0.30729.4926
Windows Communication Foundation 3.0.4506.4926
Windows Presentation Foundation 3.0.6920.4902
v3.53.5.30729.4926
Client 4.8.04084528372
Full 4.8.04084528372
Client 4.0.0.0
Relevant Modules (installed)
❯ Get-Module Pester
ModuleType Version Name ExportedCommands
-------------------------------------
Script 4.10.1 Pester {Add-AssertionOperator, ...
❯ Get-Module Pester -ListAvailable
Directory: C:\Users\David\Documents\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
-------------------------------------
Script 5.2.2 Pester {Invoke-Pester, Describe...
Script 5.2.1 Pester {Invoke-Pester, Describe...
Script 5.1.1 Pester {Invoke-Pester, Describe...
Script 4.10.1 Pester {Describe, Context, It, ...
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
-------------------------------------
Script 3.4.0 Pester {Describe, Context, It, ...
Changing Line 25 to $FilePath = "$env:TMP\YOUR_PATH.txt" works for me.
Is this intentional to highlight? I did not think so as it isn't described...
The text was updated successfully, but these errors were encountered:
Hmm. That'll be tricky, it'll break for folks on non-Windows OSes if we change that to be \ for everyone. I suppose we should change this to use [IO.Path]::DirectorySeparatorChar to find the right char to use in this instance.
Describe "Koan Bug, Issue, or Help Request"
minor typo...
AboutCmdletVerbs.Koans.ps1
Line 25:
$FilePath = "$env:TMP/YOUR_PATH.txt"
This works to find the path all the way until the last assertion
Context "The Problematic Assertions"
Context "Your Attempts"
Context "Additional Information"
My local Environment:
Changing Line 25 to
$FilePath = "$env:TMP\YOUR_PATH.txt"
works for me.Is this intentional to highlight? I did not think so as it isn't described...
The text was updated successfully, but these errors were encountered: