spec/spec_helper.rb in amqp-1.0.0.pre2 vs spec/spec_helper.rb in amqp-1.0.0
- old
+ new
@@ -13,10 +13,16 @@
puts "Using Ruby #{RUBY_VERSION}, amq-client #{AMQ::Client::VERSION} and amq-protocol #{AMQ::Protocol::VERSION}"
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
self.inject({}) do |result, (key, value)|
new_key = key.is_a?(String) ? key.to_sym : key
@@ -26,11 +32,11 @@
end
end
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}"
#
@@ -80,6 +86,6 @@
end
def rubinius?
defined?(RUBY_ENGINE) && (RUBY_ENGINE == 'rbx')
end
-end
\ No newline at end of file
+end