discourse/discourse_api — pull request #33 by oblakeerickson (2014-09-01 16:38:35+00:00)
Title: disable we requests, but allow localhost

I added `:allow_localhost => true` to WebMock because I was getting this error when I was trying to run my tests:

DiscourseApi::API::Topics#latest_topics returns the requested topics
Failure/Error: topics = subject.latest_topics
WebMock::NetConnectNotAllowedError:
Real HTTP connections are disabled.

This fix allows localhost connections but keeps any external connections disabled. See: https://github.com/bblimke/webmock#external-requests-can-be-disabled-while-allowing-localhost