We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76d3dd1 commit 76c60b9Copy full SHA for 76c60b9
2 files changed
lib/react/test/session.rb
@@ -21,6 +21,10 @@ def component
21
def update_params(params)
22
component.set_props(params)
23
end
24
+
25
+ def force_update!
26
+ component.force_update!
27
+ end
28
29
30
spec/react/test/session_spec.rb
@@ -68,6 +68,13 @@ def render
68
subject.update_params(message: 'moon')
69
expect(component.params.from).to eq('outerspace')
70
71
72
+ describe '#force_update' do
73
+ it 'causes the component to render' do
74
+ component = subject.mount(Greeter)
75
+ expect(component).to receive(:render)
76
+ subject.force_update!
77
78
79
80
0 commit comments