gir_ffi 0.8.3 → 0.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog.md +9 -1
- data/Gemfile +1 -1
- data/README.md +3 -2
- data/lib/ffi-glib/bytes.rb +0 -14
- data/lib/ffi-glib/hash_table.rb +0 -1
- data/lib/ffi-gobject/object.rb +7 -0
- data/lib/ffi-gobject_introspection/i_base_info.rb +4 -0
- data/lib/ffi-gobject_introspection/lib.rb +1 -0
- data/lib/gir_ffi/boxed_base.rb +2 -2
- data/lib/gir_ffi/builders/callback_argument_builder.rb +3 -1
- data/lib/gir_ffi/builders/closure_return_value_builder.rb +0 -1
- data/lib/gir_ffi/builders/module_builder.rb +9 -2
- data/lib/gir_ffi/builders/null_class_builder.rb +1 -0
- data/lib/gir_ffi/builders/registered_type_builder.rb +5 -1
- data/lib/gir_ffi/callback_base.rb +2 -2
- data/lib/gir_ffi/enum_base.rb +2 -2
- data/lib/gir_ffi/in_out_pointer.rb +1 -1
- data/lib/gir_ffi/info_ext/i_registered_type_info.rb +1 -1
- data/lib/gir_ffi/object_base.rb +24 -8
- data/lib/gir_ffi/sized_array.rb +2 -2
- data/lib/gir_ffi/version.rb +1 -1
- data/lib/gir_ffi/zero_terminated.rb +12 -1
- data/lib/gir_ffi-base/glib/boolean.rb +2 -2
- data/tasks/test.rake +25 -23
- data/test/base_test_helper.rb +3 -4
- data/test/ffi-gobject/object_test.rb +10 -4
- data/test/ffi-gobject_introspection/i_property_info_test.rb +3 -2
- data/test/gir_ffi/builders/module_builder_test.rb +26 -3
- data/test/gir_ffi/object_base_test.rb +2 -2
- data/test/integration/generated_everything_test.rb +428 -0
- data/test/integration/generated_gimarshallingtests_test.rb +17 -0
- data/test/integration/generated_gtop_test.rb +21 -0
- data/test/integration/generated_regress_test.rb +734 -0
- data/test/integration/generated_warnlib_test.rb +47 -0
- data/test/introspection_test_helper.rb +2 -0
- data/test/lib/Makefile.am +82 -16
- data/test/lib/configure.ac +3 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1ad50242508ce93d6d0b6751cd18b550f3f8137
|
4
|
+
data.tar.gz: b4ea1af0594d95c7293edabbf4f108506b2d46c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71bc54a2a76ddaa7a8d3633c02ce1ccc123ca036031e7c207fb6808aa81c995e30bf2eb4ffa7bc78321401f09887d1118862e7178534d12bc962c32099889355
|
7
|
+
data.tar.gz: 099c5f239a3f1d7222871f1ad3f78730e733dbbc6c8f7fe278740b261390271f7aa072174ccf3a92b3246ead586d52bd29c09c22596474ede0282ef612c86ea7
|
data/Changelog.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.8.4 / 2015-12-03
|
4
|
+
|
5
|
+
* Handle classes with lower-case names
|
6
|
+
* Make ObjectBase a DataConverter so FFI handles it natively
|
7
|
+
* Use more of gobject-introspection's test libraries for testing
|
8
|
+
* Simplify constructor overrides: Custom initializers will no longer be
|
9
|
+
overwritten when setting up the corresponding constructor.
|
10
|
+
* Override GObject::Object.new to not require a GType argument
|
11
|
+
|
3
12
|
## 0.8.3 / 2015-11-13
|
4
13
|
|
5
14
|
* Fix handling of signal handler return values
|
@@ -50,7 +59,6 @@
|
|
50
59
|
* Increase refcount for :object return values of vfuncs with full transfer
|
51
60
|
* Increase refcount for outgoing :object arguments of vfuncs with full ownership
|
52
61
|
transfer
|
53
|
-
* Apply more RuboCop rules
|
54
62
|
* Support Ruby 2.2
|
55
63
|
* Rename several methods. The old names are deprecated and will be removed in 0.8.0.
|
56
64
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -64,8 +64,9 @@ GirFFI is developed on Debian sid, and tested through Travis CI on Ubuntu
|
|
64
64
|
12.04. Older versions of gobject-introspection than the ones used there
|
65
65
|
are therefore not officially supported (although they may work).
|
66
66
|
|
67
|
-
On Debian and Ubuntu, installing `libgirepository1.0-dev
|
68
|
-
`gobject-introspection` should be enough to get
|
67
|
+
On Debian and Ubuntu, installing `libgirepository1.0-dev`,
|
68
|
+
`gobject-introspection` and `gir1.2-gtop-2.0` should be enough to get
|
69
|
+
`rake test` working.
|
69
70
|
|
70
71
|
GirFFI has not been tested on Mac OS X or Microsoft Windows. YMMV.
|
71
72
|
|
data/lib/ffi-glib/bytes.rb
CHANGED
@@ -32,20 +32,6 @@ module GLib
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
-
# Why redefine new here? The class builder will only define the full
|
36
|
-
# version of 'new' on first call, causing both new and initialize to be
|
37
|
-
# defined. This overwrites the custom version of initialize below.
|
38
|
-
# TODO: Improve class builder so this trick is not needed.
|
39
|
-
class << self
|
40
|
-
undef new
|
41
|
-
end
|
42
|
-
|
43
|
-
def self.new(*args)
|
44
|
-
obj = allocate
|
45
|
-
obj.__send__ :initialize, *args
|
46
|
-
obj
|
47
|
-
end
|
48
|
-
|
49
35
|
def initialize(arr)
|
50
36
|
data = GirFFI::SizedArray.from :guint8, arr.size, arr
|
51
37
|
store_pointer Lib.g_bytes_new data.to_ptr, data.size
|
data/lib/ffi-glib/hash_table.rb
CHANGED
data/lib/ffi-gobject/object.rb
CHANGED
@@ -5,6 +5,13 @@ module GObject
|
|
5
5
|
class Object
|
6
6
|
setup_method 'new'
|
7
7
|
|
8
|
+
def initialize_with_automatic_gtype(properties)
|
9
|
+
initialize_without_automatic_gtype(self.class.gtype, properties)
|
10
|
+
end
|
11
|
+
|
12
|
+
alias_method :initialize_without_automatic_gtype, :initialize
|
13
|
+
alias_method :initialize, :initialize_with_automatic_gtype
|
14
|
+
|
8
15
|
def store_pointer(ptr)
|
9
16
|
super
|
10
17
|
klass = self.class
|
@@ -68,6 +68,7 @@ module GObjectIntrospection
|
|
68
68
|
|
69
69
|
attach_function :g_base_info_ref, [:pointer], :void
|
70
70
|
attach_function :g_base_info_unref, [:pointer], :void
|
71
|
+
attach_function :g_base_info_get_attribute, [:pointer, :string], :string
|
71
72
|
attach_function :g_base_info_get_type, [:pointer], :IInfoType
|
72
73
|
attach_function :g_base_info_get_name, [:pointer], :string
|
73
74
|
attach_function :g_base_info_get_namespace, [:pointer], :string
|
data/lib/gir_ffi/boxed_base.rb
CHANGED
@@ -33,12 +33,19 @@ module GirFFI
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def build_namespaced_class(classname)
|
36
|
-
info =
|
36
|
+
info = find_namespaced_class_info(classname)
|
37
|
+
Builder.build_class info
|
38
|
+
end
|
39
|
+
|
40
|
+
def find_namespaced_class_info(classname)
|
41
|
+
name = classname.to_s
|
42
|
+
info = gir.find_by_name(@namespace, name) ||
|
43
|
+
gir.find_by_name(@namespace, name.sub(/^./, &:downcase))
|
37
44
|
unless info
|
38
45
|
raise NameError,
|
39
46
|
"Class #{classname} not found in namespace #{@namespace}"
|
40
47
|
end
|
41
|
-
|
48
|
+
info
|
42
49
|
end
|
43
50
|
|
44
51
|
private
|
@@ -42,7 +42,11 @@ module GirFFI
|
|
42
42
|
|
43
43
|
def define_method(method_info)
|
44
44
|
if method_info.constructor?
|
45
|
-
|
45
|
+
initializer_builder = InitializerBuilder.new(method_info)
|
46
|
+
initializer_name = initializer_builder.method_name.to_sym
|
47
|
+
unless build_class.private_instance_methods(false).include? initializer_name
|
48
|
+
build_class.class_eval initializer_builder.method_definition
|
49
|
+
end
|
46
50
|
build_class.class_eval ConstructorBuilder.new(method_info).method_definition
|
47
51
|
else
|
48
52
|
build_class.class_eval FunctionBuilder.new(method_info).method_definition
|
@@ -69,8 +69,8 @@ module GirFFI
|
|
69
69
|
pointer.put_pointer 0, to_native(value, nil)
|
70
70
|
end
|
71
71
|
|
72
|
-
def self.get_value_from_pointer(pointer)
|
73
|
-
from_native pointer.get_pointer(
|
72
|
+
def self.get_value_from_pointer(pointer, offset)
|
73
|
+
from_native pointer.get_pointer(offset), nil
|
74
74
|
end
|
75
75
|
end
|
76
76
|
end
|
data/lib/gir_ffi/enum_base.rb
CHANGED
@@ -34,8 +34,8 @@ module GirFFI
|
|
34
34
|
pointer.put_int32 0, to_native(value, nil)
|
35
35
|
end
|
36
36
|
|
37
|
-
def get_value_from_pointer(pointer)
|
38
|
-
from_native pointer.get_int32(
|
37
|
+
def get_value_from_pointer(pointer, offset)
|
38
|
+
from_native pointer.get_int32(offset), nil
|
39
39
|
end
|
40
40
|
|
41
41
|
def setup_and_call(method, arguments, &block)
|
data/lib/gir_ffi/object_base.rb
CHANGED
@@ -1,6 +1,30 @@
|
|
1
|
+
require 'gir_ffi/class_base'
|
2
|
+
|
1
3
|
module GirFFI
|
2
4
|
# Base class for all generated classes of type :object.
|
3
5
|
class ObjectBase < ClassBase
|
6
|
+
extend FFI::DataConverter
|
7
|
+
|
8
|
+
def self.native_type
|
9
|
+
FFI::Type::POINTER
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.to_ffi_type
|
13
|
+
self
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.to_native(it, _)
|
17
|
+
it.to_ptr
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.get_value_from_pointer(pointer, offset = 0)
|
21
|
+
pointer.get_pointer offset
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.copy_value_to_pointer(value, pointer, offset = 0)
|
25
|
+
pointer.put_pointer offset, value.to_ptr
|
26
|
+
end
|
27
|
+
|
4
28
|
# Wrap the passed pointer in an instance of its type's corresponding class,
|
5
29
|
# generally assumed to be a descendant of the current type.
|
6
30
|
def self.wrap(ptr)
|
@@ -29,14 +53,6 @@ module GirFFI
|
|
29
53
|
gir_ffi_builder.find_signal name
|
30
54
|
end
|
31
55
|
|
32
|
-
def self.to_ffi_type
|
33
|
-
:pointer
|
34
|
-
end
|
35
|
-
|
36
|
-
def self.copy_value_to_pointer(value, pointer, offset = 0)
|
37
|
-
pointer.put_pointer offset, value.to_ptr
|
38
|
-
end
|
39
|
-
|
40
56
|
def self.object_class
|
41
57
|
gir_ffi_builder.object_class
|
42
58
|
end
|
data/lib/gir_ffi/sized_array.rb
CHANGED
data/lib/gir_ffi/version.rb
CHANGED
@@ -38,7 +38,7 @@ module GirFFI
|
|
38
38
|
private
|
39
39
|
|
40
40
|
def read_value(offset)
|
41
|
-
val =
|
41
|
+
val = fetch_value(offset)
|
42
42
|
val unless val.zero?
|
43
43
|
end
|
44
44
|
|
@@ -46,6 +46,17 @@ module GirFFI
|
|
46
46
|
@getter_method ||= "get_#{ffi_type}"
|
47
47
|
end
|
48
48
|
|
49
|
+
def fetch_value(offset)
|
50
|
+
case ffi_type
|
51
|
+
when Module
|
52
|
+
ffi_type.get_value_from_pointer(@ptr, offset)
|
53
|
+
when Symbol
|
54
|
+
@ptr.send(getter_method, offset)
|
55
|
+
else
|
56
|
+
raise NotImplementedError
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
49
60
|
def wrap_value(val)
|
50
61
|
case element_type
|
51
62
|
when Array
|
@@ -22,8 +22,8 @@ module GLib
|
|
22
22
|
pointer.put_int 0, to_native(value, nil)
|
23
23
|
end
|
24
24
|
|
25
|
-
def self.get_value_from_pointer(pointer)
|
26
|
-
from_native pointer.get_int(
|
25
|
+
def self.get_value_from_pointer(pointer, offset)
|
26
|
+
from_native pointer.get_int(offset), nil
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
data/tasks/test.rake
CHANGED
@@ -28,40 +28,40 @@ class Listener
|
|
28
28
|
obj_name = attrs['name']
|
29
29
|
case name
|
30
30
|
when "constant"
|
31
|
-
result.puts " it
|
31
|
+
result.puts " it 'has the constant #{obj_name}' do"
|
32
32
|
when "record", "class", "enumeration", "bitfield", "interface", "union"
|
33
|
-
result.puts " describe
|
33
|
+
result.puts " describe '#{namespace}::#{obj_name}' do"
|
34
34
|
@inside_class = name
|
35
35
|
when "constructor"
|
36
|
-
result.puts " it
|
36
|
+
result.puts " it 'creates an instance using ##{obj_name}' do"
|
37
37
|
when "field"
|
38
38
|
if @inside_class != 'class'
|
39
39
|
if attrs['private'] == "1"
|
40
|
-
result.puts " it
|
40
|
+
result.puts " it 'has a private field #{obj_name}' do"
|
41
41
|
elsif attrs['writable'] == "1"
|
42
|
-
result.puts " it
|
42
|
+
result.puts " it 'has a writable field #{obj_name}' do"
|
43
43
|
else
|
44
|
-
result.puts " it
|
44
|
+
result.puts " it 'has a read-only field #{obj_name}' do"
|
45
45
|
end
|
46
46
|
end
|
47
47
|
when "function", "method"
|
48
48
|
spaces = @inside_class ? " " : ""
|
49
|
-
result.puts " #{spaces}it
|
49
|
+
result.puts " #{spaces}it 'has a working #{name} ##{obj_name}' do"
|
50
50
|
when "member"
|
51
|
-
result.puts " it
|
51
|
+
result.puts " it 'has the member :#{obj_name}' do"
|
52
52
|
when "namespace"
|
53
53
|
result.puts "describe #{obj_name} do"
|
54
54
|
when "property"
|
55
55
|
accessor_name = obj_name.gsub(/-/, '_')
|
56
56
|
result.puts " describe \"its '#{obj_name}' property\" do"
|
57
|
-
result.puts " it
|
57
|
+
result.puts " it 'can be retrieved with #get_property' do"
|
58
58
|
result.puts " end"
|
59
|
-
result.puts " it
|
59
|
+
result.puts " it 'can be retrieved with ##{accessor_name}' do"
|
60
60
|
result.puts " end"
|
61
61
|
if attrs['writable'] == '1'
|
62
|
-
result.puts " it
|
62
|
+
result.puts " it 'can be set with #set_property' do"
|
63
63
|
result.puts " end"
|
64
|
-
result.puts " it
|
64
|
+
result.puts " it 'can be set with ##{accessor_name}=' do"
|
65
65
|
result.puts " end"
|
66
66
|
end
|
67
67
|
when "glib:signal"
|
@@ -145,7 +145,7 @@ namespace :test do
|
|
145
145
|
t.test_files = FileList['test/integration/**/*_test.rb']
|
146
146
|
end
|
147
147
|
|
148
|
-
desc 'Build
|
148
|
+
desc 'Build test libraries and typelibs'
|
149
149
|
task :lib => "test/lib/Makefile" do
|
150
150
|
sh %{cd test/lib && make}
|
151
151
|
end
|
@@ -169,19 +169,21 @@ namespace :test do
|
|
169
169
|
:overrides,
|
170
170
|
:integration]
|
171
171
|
|
172
|
-
|
173
|
-
|
174
|
-
file = File.new 'test/lib/Regress-1.0.gir'
|
172
|
+
def make_stub_file(libname)
|
173
|
+
file = File.new "test/lib/#{libname}-1.0.gir"
|
175
174
|
listener = Listener.new
|
176
|
-
listener.result = File.open(
|
177
|
-
listener.namespace =
|
175
|
+
listener.result = File.open("tmp/#{libname.downcase}_lines.rb", 'w')
|
176
|
+
listener.namespace = libname
|
178
177
|
REXML::Document.parse_stream file, listener
|
178
|
+
end
|
179
179
|
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
180
|
+
desc "Create stubs for integration tests"
|
181
|
+
task :stub => :lib do
|
182
|
+
make_stub_file 'Everything'
|
183
|
+
make_stub_file 'GIMarshallingTests'
|
184
|
+
make_stub_file 'Regress'
|
185
|
+
make_stub_file 'Utility'
|
186
|
+
make_stub_file 'WarnLib'
|
185
187
|
end
|
186
188
|
end
|
187
189
|
|
data/test/base_test_helper.rb
CHANGED
@@ -3,6 +3,7 @@ require 'rubygems' if RUBY_PLATFORM == 'java'
|
|
3
3
|
begin
|
4
4
|
require 'simplecov'
|
5
5
|
SimpleCov.start do
|
6
|
+
track_files 'lib/**/*.rb'
|
6
7
|
add_filter '/test/'
|
7
8
|
end
|
8
9
|
|
@@ -25,10 +26,8 @@ module GObjectIntrospection
|
|
25
26
|
class IRepository
|
26
27
|
def shared_library_with_regress(namespace)
|
27
28
|
case namespace
|
28
|
-
when 'Regress'
|
29
|
-
return File.join(File.dirname(__FILE__), 'lib',
|
30
|
-
when 'GIMarshallingTests'
|
31
|
-
return File.join(File.dirname(__FILE__), 'lib', 'libgimarshallingtests.so')
|
29
|
+
when 'Everything', 'GIMarshallingTests', 'Regress', 'Utility', 'WarnLib'
|
30
|
+
return File.join(File.dirname(__FILE__), 'lib', "lib#{namespace.downcase}.so")
|
32
31
|
else
|
33
32
|
return shared_library_without_regress namespace
|
34
33
|
end
|
@@ -3,6 +3,12 @@ require 'gir_ffi_test_helper'
|
|
3
3
|
require 'ffi-gobject'
|
4
4
|
|
5
5
|
describe GObject::Object do
|
6
|
+
describe '.new' do
|
7
|
+
it 'is overridden to take only one argument' do
|
8
|
+
GObject::Object.new(nil).must_be_instance_of GObject::Object
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
6
12
|
describe '#get_property' do
|
7
13
|
it 'is overridden to have arity 1' do
|
8
14
|
GObject::Object.instance_method('get_property').arity.must_equal 1
|
@@ -20,7 +26,7 @@ describe GObject::Object do
|
|
20
26
|
end
|
21
27
|
end
|
22
28
|
|
23
|
-
subject { AccessorTest.new
|
29
|
+
subject { AccessorTest.new nil }
|
24
30
|
|
25
31
|
it 'reads x by calling get_x' do
|
26
32
|
subject.set_x(1)
|
@@ -34,7 +40,7 @@ describe GObject::Object do
|
|
34
40
|
end
|
35
41
|
|
36
42
|
describe '#signal_connect' do
|
37
|
-
subject { GObject::Object.new
|
43
|
+
subject { GObject::Object.new nil }
|
38
44
|
|
39
45
|
it 'delegates to GObject' do
|
40
46
|
expect(GObject).to receive(:signal_connect).with(subject, 'some-event', nil)
|
@@ -52,7 +58,7 @@ describe GObject::Object do
|
|
52
58
|
end
|
53
59
|
|
54
60
|
describe '#signal_connect_after' do
|
55
|
-
subject { GObject::Object.new
|
61
|
+
subject { GObject::Object.new nil }
|
56
62
|
|
57
63
|
it 'delegates to GObject' do
|
58
64
|
expect(GObject).to receive(:signal_connect_after).with(subject, 'some-event', nil)
|
@@ -75,7 +81,7 @@ describe GObject::Object do
|
|
75
81
|
skip 'cannot be reliably tested on JRuby and Rubinius'
|
76
82
|
end
|
77
83
|
|
78
|
-
object = GObject::Object.new
|
84
|
+
object = GObject::Object.new nil
|
79
85
|
ptr = object.to_ptr
|
80
86
|
ref_count(ptr).must_equal 1
|
81
87
|
|
@@ -22,8 +22,9 @@ describe GObjectIntrospection::IPropertyInfo do
|
|
22
22
|
end
|
23
23
|
|
24
24
|
describe "for GObject::Binding's 'target-property' property" do
|
25
|
-
let(:property_info)
|
26
|
-
get_property_introspection_data 'GObject', 'Binding', 'target-property'
|
25
|
+
let(:property_info) do
|
26
|
+
get_property_introspection_data 'GObject', 'Binding', 'target-property'
|
27
|
+
end
|
27
28
|
|
28
29
|
it 'returns :utf8 as its type' do
|
29
30
|
property_info.property_type.tag.must_equal :utf8
|
@@ -1,17 +1,40 @@
|
|
1
1
|
require 'gir_ffi_test_helper'
|
2
2
|
|
3
3
|
describe GirFFI::Builders::ModuleBuilder do
|
4
|
-
|
4
|
+
let(:gir) { GObjectIntrospection::IRepository.default }
|
5
|
+
|
6
|
+
describe '#find_namespaced_class_info' do
|
7
|
+
it 'finds the info in the GIR' do
|
8
|
+
allow(gir).to receive(:require).with('Foo', nil)
|
9
|
+
|
10
|
+
builder = GirFFI::Builders::ModuleBuilder.new 'Foo'
|
11
|
+
|
12
|
+
expect(gir).to receive(:find_by_name).with('Foo', 'Bar').and_return 'gir info'
|
13
|
+
|
14
|
+
builder.find_namespaced_class_info(:Bar).must_equal 'gir info'
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'checks downcased class name as an alternative' do
|
18
|
+
allow(gir).to receive(:require).with('Foo', nil)
|
19
|
+
|
20
|
+
builder = GirFFI::Builders::ModuleBuilder.new 'Foo'
|
21
|
+
|
22
|
+
expect(gir).to receive(:find_by_name).with('Foo', 'Bar').and_return nil
|
23
|
+
expect(gir).to receive(:find_by_name).with('Foo', 'bar').and_return 'gir info'
|
24
|
+
|
25
|
+
builder.find_namespaced_class_info(:Bar).must_equal 'gir info'
|
26
|
+
end
|
27
|
+
|
5
28
|
it 'raises a clear error if the named class does not exist' do
|
6
|
-
gir = GObjectIntrospection::IRepository.default
|
7
29
|
allow(gir).to receive(:require).with('Foo', nil)
|
8
30
|
|
9
31
|
builder = GirFFI::Builders::ModuleBuilder.new 'Foo'
|
10
32
|
|
11
33
|
expect(gir).to receive(:find_by_name).with('Foo', 'Bar').and_return nil
|
34
|
+
expect(gir).to receive(:find_by_name).with('Foo', 'bar').and_return nil
|
12
35
|
|
13
36
|
assert_raises NameError do
|
14
|
-
builder.
|
37
|
+
builder.find_namespaced_class_info :Bar
|
15
38
|
end
|
16
39
|
end
|
17
40
|
end
|