Sha256: 0f7166b0562126082e17240a3ea57c042710f966a7f1c639c0527e5fe96c290e

Contents?: true

Size: 725 Bytes

Versions: 14

Compression:

Stored size: 725 Bytes

Contents

require 'test_helper'

class MiscTest < Test::Unit::TestCase
  def test_overridden_const
    assert(VIM::SecurityError < RbVmomi::BasicTypes::Base)
    assert_equal 'SecurityError', VIM::SecurityError.wsdl_name
  end

  # XXX
  def disabled_test_dynamically_overridden_const
    assert !VIM.const_defined?(:ClusterAttemptedVmInfo)
    Object.const_set :ClusterAttemptedVmInfo, :override
    assert VIM::ClusterAttemptedVmInfo.is_a?(Class)
    assert(VIM::ClusterAttemptedVmInfo < RbVmomi::BasicTypes::Base)
    assert_equal 'ClusterAttemptedVmInfo', VIM::ClusterAttemptedVmInfo.wsdl_name
  end

  def test_loader
    klass = VIM.loader.get('HostSystem')
    klass2 = VIM::HostSystem
    assert_equal klass, klass2
  end
end

Version data entries

14 entries across 14 versions & 4 rubygems

Version Path
rbvmomi-1.8.5 test/test_misc.rb
rbvmomi-1.8.4 test/test_misc.rb
rbvmomi-1.8.3 test/test_misc.rb
rbvmomi-1.8.2 test/test_misc.rb
rbvmomi-1.8.2.pre test/test_misc.rb
mkuzmin-rbvmomi-1.8.2.1 test/test_misc.rb
vagrant-rbvmomi-1.8.1 test/test_misc.rb
rbvmomi-1.8.1 test/test_misc.rb
rbvmomi-1.8.0 test/test_misc.rb
gapinc-rbvmomi-1.6.1 test/test_misc.rb
gapinc-rbvmomi-1.6.0 test/test_misc.rb
rbvmomi-1.6.0 test/test_misc.rb
rbvmomi-1.5.1 test/test_misc.rb
rbvmomi-1.5.0 test/test_misc.rb