Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

only mock the Helper http connection if HUBOT_LIVE env var is unset

  • Loading branch information...
commit 5294d42d567adf7c1626dba29cf03773bbd15573 1 parent 9844090
@technoweenie technoweenie authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 test/tests.coffee
View
9 test/tests.coffee
@@ -49,8 +49,9 @@ class Helper extends Robot
user = new Robot.User 1, 'helper'
super new Robot.TextMessage(user, text)
-class Helper.Response extends Robot.Response
- # This changes ever HTTP request to hit the danger server above
- http: (url) ->
- super(url).host('127.0.0.1').port(9001)
+if not process.env.HUBOT_LIVE
+ class Helper.Response extends Robot.Response
+ # This changes ever HTTP request to hit the danger server above
+ http: (url) ->
+ super(url).host('127.0.0.1').port(9001)
Please sign in to comment.
Something went wrong with that request. Please try again.