This doesn't really give any clues to what would constitute an invalid hostname, as it uses the RSpec helper `errors_on` to simulate a failure. In that sense the `valid_hostname` method is not being tested at all.