Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Commit 776b54e

Browse files
committed
Restrict jqeury extension usage in test
1 parent fbd14e7 commit 776b54e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spec/react/component_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def render
269269
end
270270

271271
element = renderToDocument(Foo)
272-
expect(Element[element].text).to eq('10')
272+
expect(`#{element.dom_node}.textContent`).to eq('10')
273273
end
274274

275275
it 'supports original `setState` as `set_state` method' do
@@ -344,7 +344,7 @@ def render
344344
end
345345

346346
element = renderToDocument(Foo, prop: 'foobar')
347-
expect(Element[element].text).to eq('foobar')
347+
expect(`#{element.dom_node}.textContent`).to eq('foobar')
348348
end
349349

350350
it 'accesses nested params as orignal Ruby object' do
@@ -355,7 +355,7 @@ def render
355355
end
356356

357357
element = renderToDocument(Foo, prop: [{foo: 10}])
358-
expect(Element[element].text).to eq('10')
358+
expect(`#{element.dom_node}.textContent`).to eq('10')
359359
end
360360
end
361361

spec/react/react_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
[React.create_element('span'), React.create_element('span'), React.create_element('span')]
4545
end
4646
instance = renderElementToDocument(element)
47-
expect(Element[instance].children.length).to eq(3)
47+
expect(`#{instance.dom_node}.children.length`).to eq(3)
4848
end
4949
end
5050

0 commit comments

Comments
 (0)