In my app, I have the following code:
File.open "filename", "w" do |file| file.write("text") end
I want to te
You can use fakefs.
It stubs filesystem and creates files in memory
You check with
File.exists? "filename"
if file was created.
You can also just read it with
File.open
and run expectation on its contents.