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

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -