Fix em-http-request callback triggering #196

Merged
merged 1 commit into from Jul 23, 2012
Commits on Jul 23, 2012
  1. @jonleighton

    Fix em-http-request callback triggering

    jonleighton committed Jul 23, 2012
    Previously, if there were other EM::Deferred callbacks registered, they
    might execute before WebMock's callback and raise an exception. This
    would prevent the WebMock callback ever running, even though there was a
    successful request.
    
    Overriding set_deferred_status prevents this by triggering WebMock's
    callbacks before running any of the EM::Deferred callbacks.
    
    Sorry, I have no idea how to test this.