I think just by doing File.new in Invoker (unless you changed it, but I didn't see a change) should do that anyway. Ruby defaults to read unless you specify so it should error out, at least that was my experience while writing the basic test.