Sha256: fca0275eb970495e0e8d75a845b169ea943b822c401e35cdbb784cc18bea49b3

Contents?: true

Size: 994 Bytes

Versions: 14

Compression:

Stored size: 994 Bytes

Contents

# -*- encoding: utf-8 -*-
require 'spec_helper'

module OnStomp::Components
  describe URI do
    it "should make stomp:// strings parseable" do
      ::URI.parse("stomp:///").should be_a_kind_of(OnStomp::Components::URI::STOMP)
    end
    it "should make stomp+ssl:// strings parseable" do
      ::URI.parse("stomp+ssl:///").should be_a_kind_of(OnStomp::Components::URI::STOMP_SSL)
    end
    
    describe URI::STOMP do
      let(:uri) { ::URI.parse("stomp:///") }
      it "should have a default port of 61613" do
        uri.port.should == 61613
      end
      it "should have an onstomp_socket_type of :tcp" do
        uri.onstomp_socket_type.should == :tcp
      end
    end
    
    describe URI::STOMP_SSL do
      let(:uri) { ::URI.parse("stomp+ssl:///") }
      it "should have a default port of 61612" do
        uri.port.should == 61612
      end
      it "should have an onstomp_socket_type of :ssl" do
        uri.onstomp_socket_type.should == :ssl
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
onstomp-1.0.12 spec/onstomp/components/uri_spec.rb
onstomp-1.0.11 spec/onstomp/components/uri_spec.rb
onstomp-1.0.10 spec/onstomp/components/uri_spec.rb
onstomp-1.0.9 spec/onstomp/components/uri_spec.rb
onstomp-1.0.8 spec/onstomp/components/uri_spec.rb
onstomp-1.0.7 spec/onstomp/components/uri_spec.rb
onstomp-1.0.6 spec/onstomp/components/uri_spec.rb
onstomp-1.0.5 spec/onstomp/components/uri_spec.rb
onstomp-1.0.4 spec/onstomp/components/uri_spec.rb
onstomp-1.0.3 spec/onstomp/components/uri_spec.rb
onstomp-1.0.2 spec/onstomp/components/uri_spec.rb
onstomp-1.0.1 spec/onstomp/components/uri_spec.rb
onstomp-1.0.0 spec/onstomp/components/uri_spec.rb
onstomp-1.0.0pre1 spec/onstomp/components/uri_spec.rb