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

Commit c591cf0

Browse files
committed
move component/base spec
1 parent 674d8ac commit c591cf0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

spec/react/component_base_spec.rb renamed to spec/react/component/base_spec.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ def render
2525
@instance_data.join(" ")
2626
end
2727
end
28-
expect(React.render_to_static_markup(React.create_element(Foo))).to eq("<span>working</span>")
29-
expect(React.render_to_static_markup(React.create_element(Bar))).to eq("<span>working well</span>")
28+
expect(rendered_component(Foo)).to eq("<span>working</span>")
29+
expect(rendered_component(Bar)).to eq("<span>working well</span>")
3030
end
3131

32+
def rendered_component(component)
33+
React.render_to_static_markup(React.create_element(component))
34+
end
3235
end
3336
end

0 commit comments

Comments
 (0)