Skip to content

Commit

Permalink
test spec for #63
Browse files Browse the repository at this point in the history
  • Loading branch information
catmando committed Jan 16, 2019
1 parent 4192c30 commit 302d4c0
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions ruby/hyper-component/spec/client_features/component_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,23 @@ class Foo < Hyperloop::Component
expect(page).to have_content("paramchildparamchild")
end

it 'can receive and render a component class' do
mount 'Baz' do
class Bar < Hyperloop::Component
param :p
render { @P.span }
end
class Foo < Hyperloop::Component
param :c
render { @C.insert_element(p: 123) }
end
class Baz < Hyperloop::Component
render { Foo(c: Bar) }
end
end
expect(page).to have_content("123")
end

it 'has a class components method' do
mount 'Foo' do
class Bar < Hyperloop::Component
Expand Down

0 comments on commit 302d4c0

Please sign in to comment.