How to use different parameter values in an RSpec mock/stub?
|Added at||2016-12-31 09:12|
My program downloads a zip file from the web then parses it. The relevant parsing-related code is:
In my RSpec test environment, I'd like to stub this code to parse a fake/mock file instead of the real one. Specifically, I'd like to replace the parameter value "real_file.zip" with "mock_file.zip".
I tried the following approach:
... but this prevents execution of code inside the block (