|
145 | 145 | l.log.should include(['getMembers', false])
|
146 | 146 | end
|
147 | 147 |
|
148 |
| - it description['.method_name', :readMember, ['method_name'], 'if member is not invocable'] do |
149 |
| - pfo, obj, l = proxy[Object.new] |
150 |
| - -> { pfo.foo }.should raise_error(NameError) |
151 |
| - l.log.should include(["isMemberInvocable", "foo"]) |
152 |
| - l.log.should include(["readMember", "foo"]) |
153 |
| - end |
154 |
| - |
155 | 148 | it description['.method_name', :invokeMember, ['method_name'], 'if member is invocable'] do
|
156 | 149 | pfo, obj, l = proxy[Class.new { def foo; 3; end }.new]
|
157 | 150 | pfo.foo
|
158 | 151 | l.log.should include(["isMemberInvocable", "foo"])
|
159 | 152 | l.log.should include(["invokeMember", "foo"])
|
160 | 153 | end
|
161 | 154 |
|
162 |
| - it description['.method_name', :readMember, ['method_name'], 'if member is readable and not invokable'] do |
| 155 | + it description['.method_name', :readMember, ['method_name'], 'if member is readable'] do |
163 | 156 | pfo, obj, l = proxy[TruffleInteropSpecs::PolyglotMember.new]
|
164 | 157 | pfo.foo = :bar
|
165 | 158 | pfo.foo
|
166 | 159 | l.log.should include(["isMemberInvocable", "foo"])
|
167 | 160 | l.log.should include(["readMember", "foo"])
|
168 | 161 | end
|
169 | 162 |
|
170 |
| - it description['.method_name', :readMember, ['method_name']] do |
171 |
| - pfo, obj, l = proxy[TruffleInteropSpecs::PolyglotMember.new] |
172 |
| - pfo.foo = Proc.new { :bar } |
173 |
| - pfo.foo.should == :bar |
| 163 | + it description['.method_name', :readMember, ['method_name'], 'and raises if member is not invocable or readable'] do |
| 164 | + pfo, obj, l = proxy[Object.new] |
| 165 | + -> { pfo.foo }.should raise_error(NameError) |
174 | 166 | l.log.should include(["isMemberInvocable", "foo"])
|
175 |
| - l.log.should include(["invokeMember", "foo"]) |
| 167 | + l.log.should include(["readMember", "foo"]) |
176 | 168 | end
|
177 | 169 |
|
178 | 170 | it description['.method_name(*arguments)', :invokeMember, ['method_name', '*arguments'], 'if member is readable and invokable'] do
|
|
206 | 198 | it description['.class', :getMetaObject] do
|
207 | 199 | pfo, obj, l = proxy[Truffle::Debug.foreign_object]
|
208 | 200 | pfo.class.should == Truffle::Interop::Foreign
|
209 |
| - Truffle::Interop.to_display_string(Truffle::Debug.foreign_object).should include("hasMetaObject()") |
| 201 | + Truffle::Interop.to_display_string(Truffle::Debug.foreign_object) |
| 202 | + l.log.should include(["hasMetaObject"]) |
210 | 203 | end
|
211 | 204 |
|
212 | 205 | it doc['.inspect', 'returns a Ruby-style `#inspect` string showing members, array elements, etc'] do
|
|
0 commit comments