In my app, I have the following code:

File.open "filename", "w" do |file|
  file.write("text")
end

I want to test this code via RSpec. What are the best practices for doing this?

Edit
Report