Permalink
Browse files

Use RabbitMQ Tracer port if environment indicates so

  • Loading branch information...
1 parent 5614df1 commit a4c40b4e8e7fde311fa813fa041a8476cecfdd3c Michael Klishin committed Mar 5, 2013
Showing with 8 additions and 2 deletions.
  1. +8 −2 spec/spec_helper.rb
View
@@ -15,6 +15,12 @@
amqp_config = File.dirname(__FILE__) + '/amqp.yml'
+port = if ENV["TRACER"]
+ 5673
+ else
+ 5672
+ end
+
if File.exists? amqp_config
class Hash
def symbolize_keys
@@ -28,7 +34,7 @@ def symbolize_keys
end
AMQP_OPTS = YAML::load_file(amqp_config).symbolize_keys[:test]
else
- AMQP_OPTS = {:host => 'localhost', :port => 5672}
+ AMQP_OPTS = {:host => 'localhost', :port => port}
end
# puts "AMQP_OPTS = #{AMQP_OPTS.inspect}"
@@ -82,4 +88,4 @@ def mri?
def rubinius?
defined?(RUBY_ENGINE) && (RUBY_ENGINE == 'rbx')
end
-end
+end

0 comments on commit a4c40b4

Please sign in to comment.