test/test_helper.rb in gir_ffi-0.0.10 vs test/test_helper.rb in gir_ffi-0.0.11
- old
+ new
@@ -13,14 +13,10 @@
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'gir_ffi'
-# 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')
module GirFFI
class IRepository
def shared_library_with_regress namespace
case namespace
@@ -46,20 +42,19 @@
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
+ def get_introspection_data namespace, name
gir = GirFFI::IRepository.default
gir.require namespace, nil
- gir.find_by_name namespace, function
+ gir.find_by_name namespace, name
end
- def get_method_introspection_data namespace, klass, function
+ def get_method_introspection_data namespace, klass, name
gir = GirFFI::IRepository.default
gir.require namespace, nil
- gir.find_by_name(namespace, klass).find_method function
+ gir.find_by_name(namespace, klass).find_method name
end
SAVED_MODULES = {}
def save_module name