-
-
Notifications
You must be signed in to change notification settings - Fork 476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The example in the documentation for TestDrive:\
no longer work
#1733
Comments
It would also great to add in the docs that |
TestDrive is no different than any other location on disk. In fact it is just an "alias" of |
Or maybe I am misunderstanding what you tried to say. |
I understand how TestDrive work and I use it already mostly for json and text files. I had a case where I have a zip and for zip files IMO it doesn't make sense to use $mockFile = "TestDrive:\File.zip"
Set-Content $mockFile -Value "any content" Maybe this is the way, but it just does not feel right! |
I am still not sure what you are after. The documentation does not tell you to write zip files using Set-Content. It might be fine if you are just checking a presence of a zip file, but won't work if you try to unzip it. The documentation just shows one example of how to create a file on TestDrive, it does not force you to use Set-Content. |
Ok, I might be doing something wrong then, because without Set-Content I get an exception that the file does not exist. |
You are not doing anything wrong. 🙂 TestDrive points into an empty folder. This folder will be deleted once your top level Describe ends. If you don't put any files in TestDrive the won't be any. TestDrive is a way to give you a place on your disk:
|
The example in the documentation for
TestDrive:\
also no longer works. It needs to be rewritten to use aBeforeAll
block.Originally posted by @markwragg in #1645 (comment)
The text was updated successfully, but these errors were encountered: