Sha256: 7a809582417c5162fa4d653b1cba3ab871d156b429dec7fcd09a2c8e635e92aa
Contents?: true
Size: 978 Bytes
Versions: 2
Compression:
Stored size: 978 Bytes
Contents
#!/usr/local/env ruby -Ku # encoding: utf-8 # $Id:$ begin require 'rjb' rescue LoadError require 'rubygems' require 'rjb' end if Rjb::VERSION < '1.2.2' puts "Rjb #{Rjb::VERSION} does not support rjbextension. exit" exit 0 end require 'rjbextension' require 'test/unit' require 'fileutils' FileUtils.rm_f 'jp/co/infoseek/hp/arton/rjb/Base.class' puts "start RJB(#{Rjb::VERSION}) test" class ExtTestRjb < Test::Unit::TestCase def jp JavaPackage.new('jp') end def test_absolute_path_require assert !Rjb::loaded? require File.absolute_path('./rjbtest.jar') Rjb::load assert Rjb::loaded? base = jp.co.infoseek.hp.arton.rjb.Base.new assert_equal('hello', base.instance_var) end def test_require_extension org_load_path = $LOAD_PATH $LOAD_PATH << '.' require 'rjbtest.jar' Rjb::load assert Rjb::loaded? base = jp.co.infoseek.hp.arton.rjb.Base.new assert_equal('hello', base.instance_var) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rjb-1.7.3 | test/exttest.rb |
rjb-1.7.1 | test/exttest.rb |