test/test_helper.rb in gir_ffi-0.0.9 vs test/test_helper.rb in gir_ffi-0.0.10

- old
+ new

@@ -1,5 +1,11 @@ +if RUBY_PLATFORM == 'java' + require 'java' + JRuby.objectspace = true + require 'rubygems' +end + require 'minitest/spec' require 'minitest/autorun' require 'rr' require 'ffi' @@ -7,15 +13,10 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) require 'gir_ffi' -if RUBY_PLATFORM == 'java' - require 'java' - JRuby.objectspace = true -end - # Since the tests will call Gtk+ functions, Gtk+ must be initialized. GirFFI.setup :Gtk, '2.0' Gtk.init GirFFI::IRepository.prepend_search_path File.join(File.dirname(__FILE__), 'lib') @@ -45,9 +46,10 @@ include RR::Adapters::TestUnit def cws code code.gsub(/(^\s*|\s*$)/, "") end + # FIXME: Rename. It can also get object, interface, etc., data. def get_function_introspection_data namespace, function gir = GirFFI::IRepository.default gir.require namespace, nil gir.find_by_name namespace, function end