This is known as stubbing the system under test, and it's a bit of a smell.

The gist: don't stub methods on the object you're testing. When you're tempted to do so, you probably want to inject that responsibility instead. 

For example, your class could accept a `Downloader` class that grabbed the contents for you. Then, in these tests, you could simply use a double.

Check out https://github.com/thoughtbot/shakespeare_analyzer/pull/7 for a good example of this.