I have a .txt file that I'd like to unit test. Is there a way with OCMock to make a "fake" test files for testing purposes? The behavior of my application depends on whats in the text file and ideally I'd like to write a unit test with different variations of the text file to test to make sure it works in all cases. The text file has a fixed name and file path.
Asked
Active
Viewed 55 times
0
-
1How do you want to read the file content? Line by line or just load it in a string? – e1985 Aug 13 '13 at 10:14
-
Do you mean you have a real text file for production, but would like to specify a fake text for for testing? – Jon Reid Aug 17 '13 at 15:59