Testing puts output with RSpec, error handling snippets