-
Notifications
You must be signed in to change notification settings - Fork 4
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
File System Mocking library #102
Comments
There is another gem called memfs: https://github.com/simonc/memfs Both are different from how webmock work though, because with webmock you say what you expect, and then you do a web request, and if it doesn't match the expectations it fails. Are you looking for an in memory fs (like fakefs/memfs) or a expect-then-do style of spec system for filesystems? I'd say both would be great, but just an in memory fs is enough for a start! |
For my current use case, an expect-then-do style of system would work. This program that I'm writing will use a config file, so being able to "read" that file and getting a known response regardless of what's on my hard drive, that's basically what I need for now. I'm sure in the long run, someone will need an entire in memory fs, but for now, the other would work for me. |
https://forum.crystal-lang.org/t/poc-pluggable-crystal-system-backends/735 |
I don't understand your POC as I'm not familiar with OS back end stuff. I thought that doing something like this would work the same way as |
Something like webmock.cr, but for the local file system. It would be very useful for testing. Ruby has something called FakeFS, so it should be entirely possible.
The text was updated successfully, but these errors were encountered: