puppetlabs / ruby-pwsh

A ruby gem for interacting with PowerShell
MIT License
15 stars 23 forks source link

(maint) - Fix incorrect test for file_path #335

Closed jordanbreen28 closed 2 months ago

jordanbreen28 commented 2 months ago

Summary

Fixes a unit test wrongly configured in https://github.com/puppetlabs/ruby-pwsh/pull/334. The invalid_directories? method should return true if passed a path that exists, but is a file. As we did not mock File.exists? the incorrect test went unnoticed.

Additional Context

Add any additional context about the problem here.

Related Issues (if any)

Mention any related issues or pull requests.

Checklist

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.08%. Comparing base (5603c13) to head (463a1ba). Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #335 +/- ## ======================================= Coverage 92.08% 92.08% ======================================= Files 6 6 Lines 720 720 ======================================= Hits 663 663 Misses 57 57 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.