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

Commit 54a66d7

Browse files
catmandozetachang
authored andcommitted
closes #142 closes #143
1 parent 46ddcbc commit 54a66d7

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

lib/generators/reactive_ruby/test_app/templates/assets/javascripts/application.rb renamed to lib/generators/reactive_ruby/test_app/templates/assets/javascripts/test_application.rb

File renamed without changes.

lib/generators/reactive_ruby/test_app/templates/application.rb.erb renamed to lib/generators/reactive_ruby/test_app/templates/test_application.rb.erb

File renamed without changes.

lib/generators/reactive_ruby/test_app/test_app_generator.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ def generate_test_app
2525

2626
def configure_test_app
2727
template 'boot.rb.erb', "#{test_app_path}/config/boot.rb", force: true
28-
template 'application.rb.erb', "#{test_app_path}/config/application.rb", force: true
29-
template 'assets/javascripts/application.rb',
28+
template 'test_application.rb.erb', "#{test_app_path}/config/application.rb", force: true
29+
template 'assets/javascripts/test_application.rb',
3030
"#{test_app_path}/app/assets/javascripts/application.rb", force: true
3131
template 'assets/javascripts/components.rb',
3232
"#{test_app_path}/app/views/components.rb", force: true

spec/react/component_spec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,14 @@ def render
713713
expect(children.size).to eq(2)
714714
expect(children.map(&:element_type)).to eq(['a', 'li'])
715715
end
716+
717+
it 'returns an empty Enumerator if there are no children' do
718+
ele = React.create_element(Foo)
719+
renderElementToDocument(ele)
720+
nodes = Foo.the_children.each
721+
expect(nodes.size).to eq(nil)
722+
expect(nodes.count).to eq(0)
723+
end
716724
end
717725
end
718726
end

0 commit comments

Comments
 (0)