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

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

mysqli - Php Mysqli_fetch_assoc Error : "Warning: Illegal string offset 'name' in" -

javascript - Chart.js - setting tooltip z-index -