Sha256: a6731608442672165a606d4809b6d8c3704b2ae1249cfa0b5aa605c2d8a7aff6
Contents?: true
Size: 935 Bytes
Versions: 6
Compression:
Stored size: 935 Bytes
Contents
require 'rubygems' require 'require_relative' if RUBY_VERSION < '1.9' require_relative 'common' describe InstanceAddress do before do @address = InstanceAddress.new('192.168.0.1') end it 'should properly report address type' do @address.address_type.must_equal :ipv4 @address.address.must_equal '192.168.0.1' @address.is_ipv4?.must_equal true InstanceAddress.new('01:23:45:67:89:ab', :type => :mac).address_type.must_equal :mac InstanceAddress.new('01:23:45:67:89:ab', :type => :mac).is_mac?.must_equal true InstanceAddress.new('test.local', :type => :hostname).is_hostname?.must_equal true InstanceAddress.new('test.local', :port => '5000', :type => :vnc).is_vnc?.must_equal true InstanceAddress.new('test.local', :port => '5000', :type => :vnc).port.must_equal '5000' InstanceAddress.new('test.local', :port => '5000', :type => :vnc).to_s.must_equal 'VNC:test.local:5000' end end
Version data entries
6 entries across 6 versions & 1 rubygems