test/test_helper.rb in stomp-1.1.3 vs test/test_helper.rb in stomp-1.1.4

- old
+ new

@@ -1,5 +1,24 @@ +$:.unshift(File.join(File.dirname(__FILE__), "..", "lib")) + require 'test/unit' require 'timeout' require 'stomp' -$:.unshift(File.join(File.dirname(__FILE__), "..", "lib")) + +# Helper routines +module TestBase + def user + ENV['STOMP_USER'] || "test" + end + def passcode + ENV['STOMP_PASSCODE'] || "user" + end + # Get host + def host + ENV['STOMP_HOST'] || "localhost" + end + # Get port + def port + (ENV['STOMP_PORT'] || 61613).to_i + end +end