refactord to ruby
Test 4: it can read a file.