I have many tests for my class. When I added check for file existence, in my class.
I needed to add this code in all my cases.
File.any_instance.
expects(:exist?).
with('test_file').
returns(true).
once()
But I want declare a global mock for all my tests, can I make this with mocha and rspec?