1
Pesterを使用して[System.IO.Path]::IsPathRooted()
をどうやって欺くのですか?私は次のことを試みたが運がなかった。Pocketを使用してMock [System.IO.Path] :: IsPathRooted()?
Describe "Configuration" {
Mock [System.IO.Path]::IsPathRooted {
return false
}
It "should mock rooted Path" {
[System.IO.Path]::IsPathRooted("C:\a") | Should Be False
}