Permalink
Browse files

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

  • Loading branch information...
technoweenie committed Oct 27, 2011
1 parent 9844090 commit 5294d42d567adf7c1626dba29cf03773bbd15573
Showing with 5 additions and 4 deletions.
  1. +5 −4 test/tests.coffee
View
@@ -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)

0 comments on commit 5294d42

Please sign in to comment.