Commit 2197317
committed
fix: Mock file-writable-p in not-writable test
The previous test relied on file permissions (mode 444) to make
file-writable-p return nil. However, with-temp-file writes to a
temp file and renames, which succeeds if you own the file,
causing file-writable-p to still return t.
Use spy-on to mock file-writable-p instead.1 parent 8ed7145 commit 2197317
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
333 | 332 | | |
334 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
335 | 336 | | |
336 | 337 | | |
337 | | - | |
338 | 338 | | |
0 commit comments