This repository was archived by the owner on Oct 19, 2018. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -134,5 +134,28 @@ def render
134134
135135 expect ( React . render_to_static_markup ( React . create_element ( Foo ) ) ) . to eq ( '<div>Hello Goodby</div>' )
136136 end
137+
138+ it "will remove all elements passed as params from the rendering buffer" do
139+ stub_const 'X2' , Class . new
140+ X2 . class_eval do
141+ include React ::Component
142+ param :ele
143+ def render
144+ div do
145+ ele . render
146+ ele . render
147+ end
148+ end
149+ end
150+ stub_const 'Test' , Class . new
151+ Test . class_eval do
152+ include React ::Component
153+ def render
154+ X2 ( ele : b { "hello" } )
155+ end
156+ end
157+
158+ expect ( React . render_to_static_markup ( React . create_element ( Test ) ) ) . to eq ( '<div><b>hello</b><b>hello</b></div>' )
159+ end
137160end
138161end
You can’t perform that action at this time.
0 commit comments