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

Commit 1172096

Browse files
committed
Remove redundant div elements
1 parent 6a5fa7b commit 1172096

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

spec/index.html.erb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
<head>
44
</head>
55
<body>
6-
<div id="placeholder" style="display: none"></div>
7-
<div id="render_here"></div>
86
<%= javascript_include_tag 'vendor/es5-shim.min' %>
97
<%= javascript_include_tag 'vendor/jquery-2.2.4.min' %>
108
<%= javascript_include_tag @server.main %>

spec/react/tutorial/tutorial_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ def render
2828
end
2929

3030
it 'renders to the document' do
31-
React.render(React.create_element(HelloMessage2), `document.getElementById('render_here')`)
32-
expect(`document.getElementById('render_here').innerHTML`) =~ 'Hello @catmando'
31+
ele = `document.createElement('div')`
32+
React.render(React.create_element(HelloMessage2), ele)
33+
expect(`#{ele}.innerHTML`) =~ 'Hello @catmando'
3334
end
3435
end
3536
end

0 commit comments

Comments
 (0)