fancy_open opens a file, runs the contents through a while that chomps it, and prepends the lines with the string in the before option and/or appends the string in the after option. It returns an array.
So what I need is a file to open and manipulate. The contents of the file do not need to be spectacular, and I will probably use my favorite dummy list.
red orange yellow spring green teal cyan azure blue violet magenta pink white black gray
I am willing to use an actual file for the test, but I am unsure where to put it. Do I put it in the t directory with the test? Is it better to use a mock file instead? I would like to get this module's tests written first. I am finally learning how to write tests, so please bear with me for a short while?
My OS is Debian 10 (Buster); my perl versions are 5.28.1 local and 5.16.3 or 5.30.0 on web host depending on the shebang.
In reply to Re^2: Can Test::MockObject mock a file?
by Lady_Aleena
in thread Can Test::MockObject mock a file?
by Lady_Aleena
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |