test/test_helper.rb in stomp-1.2.0 vs test/test_helper.rb in stomp-1.2.1

- old
+ new

@@ -27,10 +27,14 @@ end # Get port def port (ENV['STOMP_PORT'] || 61613).to_i end + # Get SSL port + def ssl_port + (ENV['STOMP_SSLPORT'] || 61612).to_i + end # Helper for minitest on 1.9 def caller_method_name parse_caller(caller(2).first).last end # Helper for minitest on 1.9 @@ -45,9 +49,20 @@ end def get_connection() ch = get_conn_headers() conn = Stomp::Connection.open(user, passcode, host, port, false, 5, ch) + conn + end + + def get_ssl_connection() + ch = get_conn_headers() + hash = { :hosts => [ + {:login => user, :passcode => passcode, :host => host, :port => ssl_port, :ssl => true}, + ], + :connect_headers => ch + } + conn = Stomp::Connection.new(hash) conn end def get_client() hash = { :hosts => [