ruby - How do I write a unit test for a method which removes characters from a text file? -
i need unit test method removes special characters ,
, :
, blank spaces.
the method under test stores each line of file in separate array position.
how test if method removed special characters of text file?
write file after method call , use regex ensure there no special characters don't want. or compare file contents against file contains result wish achieve.
Comments
Post a Comment