Skip to content
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

AboutPSProviders \ FileSystem Provider #79

Closed
indented-automation opened this issue Oct 25, 2018 · 1 comment
Closed

AboutPSProviders \ FileSystem Provider #79

indented-automation opened this issue Oct 25, 2018 · 1 comment
Labels
Category-Koans Invoking the Great Doubt Issue-Bug 🐛 Something's wrong! Up For Grabs / Hacktoberfest 💻 If it's Up For Grabs, take it and run with it! If not, ask if it's in progress / you can take it.

Comments

@indented-automation
Copy link
Contributor

indented-automation commented Oct 25, 2018

On completion of PSKoans 201 (AboutDiscovery), evaluation of a previous answer starts to fail:

Describing 'If/Else' has damaged your karma.

    You have not yet reached enlightenment.

    The answers you seek...

Expected '0 is less than 5', but got 10191.

    Please meditate on the following code:

[It] can be used to select a value for a variable
at <ScriptBlock>, C:\Users\chrident\PSKoans\Foundations\AboutConditionals.Koans.ps1: line 62
62:             $Result | Should -Be '0 is less than 5'

Because AboutPSProviders starts to add content to that same path which may change the previously given answer:

Describe 'FileSystem Provider' {
    $Path = $home | Join-Path -ChildPath 'File001.tmp'
    if (-not (Test-Path $Path)) {
        New-Item -Path $Path > $null

This is not cleaned unless you already have all the answers to that section right. I suggest using TestDrive for this set of examples, or at the very least somewhere else. Thoughts?

@vexx32
Copy link
Owner

vexx32 commented Oct 25, 2018

Agreed. This should absolutely use a TestDrive:

@vexx32 vexx32 added Issue-Bug 🐛 Something's wrong! Up For Grabs / Hacktoberfest 💻 If it's Up For Grabs, take it and run with it! If not, ask if it's in progress / you can take it. Category-Koans Invoking the Great Doubt labels Oct 25, 2018
vexx32 added a commit that referenced this issue Nov 15, 2018
Use TestDrive for FS provider
@vexx32 vexx32 mentioned this issue Nov 15, 2018
vexx32 added a commit that referenced this issue Nov 15, 2018
* Fix #86

* Fix #85
edit comment

* Fix #84
Edit comment for clarity

* Fix #79
Use TestDrive for FS provider

* Make sure to remove the alias once done

* Improve comments a good bit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category-Koans Invoking the Great Doubt Issue-Bug 🐛 Something's wrong! Up For Grabs / Hacktoberfest 💻 If it's Up For Grabs, take it and run with it! If not, ask if it's in progress / you can take it.
Projects
None yet
Development

No branches or pull requests

2 participants