@@ -202,39 +202,41 @@ def render
202
202
expect ( Foo ) . to render_static_html ( '<span>2</span>' ) . with_params ( foo : { bazwoggle : 1 } )
203
203
end
204
204
205
- it "even if contains an embedded native object" do
206
- pending 'Fix after merging'
207
- stub_const "Bar" , Class . new ( React ::Component ::Base )
208
- stub_const "BazWoggle" , Class . new
209
- BazWoggle . class_eval do
210
- def initialize ( kind )
211
- @kind = kind
212
- end
213
- attr_accessor :kind
214
- def self . _react_param_conversion ( json , validate_only )
215
- new ( JSON . from_object ( json [ 0 ] ) [ :bazwoggle ] ) if JSON . from_object ( json [ 0 ] ) [ :bazwoggle ]
216
- end
217
- end
218
- Bar . class_eval do
219
- param :foo , type : BazWoggle
220
- def render
221
- params . foo . kind . to_s
222
- end
223
- end
224
- Foo . class_eval do
225
- export_state :change_me
226
- before_mount do
227
- Foo . change_me! "initial"
228
- end
229
- def render
230
- Bar ( foo : Native ( [ `{bazwoggle: #{ Foo . change_me } }` ] ) )
231
- end
232
- end
233
- div = `document.createElement("div")`
234
- React . render ( React . create_element ( Foo , { } ) , div )
235
- Foo . change_me! "updated"
236
- expect ( `div.children[0].innerHTML` ) . to eq ( "updated" )
237
- end
205
+ it "even if contains an embedded native object"
206
+ # its not clear what this test was trying to accomplish...
207
+ # do
208
+ # pending 'Fix after merging'
209
+ # stub_const "Bar", Class.new(React::Component::Base)
210
+ # stub_const "BazWoggle", Class.new
211
+ # BazWoggle.class_eval do
212
+ # def initialize(kind)
213
+ # @kind = kind
214
+ # end
215
+ # attr_accessor :kind
216
+ # def self._react_param_conversion(json, validate_only)
217
+ # new(JSON.from_object(json[0])[:bazwoggle]) if JSON.from_object(json[0])[:bazwoggle]
218
+ # end
219
+ # end
220
+ # Bar.class_eval do
221
+ # param :foo, type: BazWoggle
222
+ # def render
223
+ # params.foo.kind.to_s
224
+ # end
225
+ # end
226
+ # Foo.class_eval do
227
+ # export_state :change_me
228
+ # before_mount do
229
+ # Foo.change_me! "initial"
230
+ # end
231
+ # def render
232
+ # Bar(foo: Native([`{bazwoggle: #{Foo.change_me}}`]))
233
+ # end
234
+ # end
235
+ # div = `document.createElement("div")`
236
+ # React.render(React.create_element(Foo, {}), div)
237
+ # Foo.change_me! "updated"
238
+ # expect(`div.children[0].innerHTML`).to eq("updated")
239
+ # end
238
240
end
239
241
240
242
it "will alias a Proc type param" do
0 commit comments