File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed
hyper-component/spec/client_features
test_app/app/hyperstack/components Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -62,21 +62,21 @@ class FooBar
6262 it "can work with builtin events" do
6363 mount 'Test' do
6464 class Btn < HyperComponent
65- fires :bungo
65+ fires :click
6666 Btn . class . attr_accessor :clicked
6767 render do
6868 BUTTON ( id : :btn ) do
6969 children . each ( &:render )
7070 end . on ( :click ) do |evt |
7171 Btn . clicked = true
72- bungo !
72+ click !
7373 evt . stop_propagation
7474 end
7575 end
7676 end
7777 class Test < HyperComponent
7878 render do
79- Btn { "CLICK ME" } . on ( :bungo ) { toggle :clicked } unless @clicked
79+ Btn { "CLICK ME" } . on ( :click ) { toggle :clicked } unless @clicked
8080 end
8181 end
8282 end
Original file line number Diff line number Diff line change 1818 expect ( page ) . to have_content ( 'more on components...' )
1919 expect ( page . current_path ) . to eq ( '/topics/components' )
2020 end
21+
22+ it 'a routers render method can return a string' , skip : 'breaking - see issue #64' do
23+ mount 'SimpleStringRouter'
24+ expect ( page ) . to have_content ( 'a simple string' )
25+ end
2126end
Original file line number Diff line number Diff line change 1+ class SimpleStringRouter < HyperComponent
2+ include Hyperstack ::Router
3+ render do
4+ 'a simple string'
5+ end
6+ end
You can’t perform that action at this time.
0 commit comments