We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5603c13 + 463a1ba commit 351b383Copy full SHA for 351b383
spec/unit/pwsh/util_spec.rb
@@ -105,8 +105,11 @@
105
expect(described_class.invalid_directories?('')).to be false
106
end
107
108
- it 'returns false if a file path is provided' do
109
- expect(described_class.invalid_directories?(file_path)).to be false
+ it 'returns true if a file path is provided' do
+ expect(described_class).to receive(:on_windows?).and_return(true)
110
+ expect(File).to receive(:exist?).with(file_path).and_return(true)
111
+ expect(File).to receive(:directory?).with(file_path).and_return(false)
112
+ expect(described_class.invalid_directories?(file_path)).to be true
113
114
115
it 'returns false if one valid path is provided' do
0 commit comments