@@ -355,23 +355,23 @@ def helper.append_javascript_pack_tag(name, **options)
355355 it { is_expected . to include '<div id="App-react-component-0"></div>' }
356356 end
357357
358- describe "'force_load ' tag option" do
359- let ( :force_load_script ) do
358+ describe "'immediate_hydration ' tag option" do
359+ let ( :immediate_hydration_script ) do
360360 %(
361361typeof ReactOnRails === 'object' && ReactOnRails.reactOnRailsComponentLoaded('App-react-component-0');
362362 ) . html_safe
363363 end
364364
365- context "with 'force_load ' == false" do
366- subject { react_component ( "App" , force_load : false ) }
365+ context "with 'immediate_hydration ' == false" do
366+ subject { react_component ( "App" , immediate_hydration : false ) }
367367
368- it { is_expected . not_to include force_load_script }
368+ it { is_expected . not_to include immediate_hydration_script }
369369 end
370370
371- context "without 'force_load ' tag option" do
371+ context "without 'immediate_hydration ' tag option" do
372372 subject { react_component ( "App" ) }
373373
374- it { is_expected . to include force_load_script }
374+ it { is_expected . to include immediate_hydration_script }
375375 end
376376 end
377377
@@ -382,8 +382,8 @@ def helper.append_javascript_pack_tag(name, **options)
382382 allow ( Rails . logger ) . to receive ( :warn )
383383 end
384384
385- context "when Pro license is NOT installed and force_load is true" do
386- subject ( :react_app ) { react_component ( "App" , props : props , force_load : true ) }
385+ context "when Pro license is NOT installed and immediate_hydration is true" do
386+ subject ( :react_app ) { react_component ( "App" , props : props , immediate_hydration : true ) }
387387
388388 before do
389389 allow ( ReactOnRails ::Utils ) . to receive ( :react_on_rails_pro_licence_valid? ) . and_return ( false )
@@ -393,28 +393,28 @@ def helper.append_javascript_pack_tag(name, **options)
393393
394394 it "logs a warning" do
395395 react_app
396- expect ( Rails . logger ) . to have_received ( :warn ) . with ( a_string_matching ( /The 'force_load ' feature requires/ ) )
396+ expect ( Rails . logger ) . to have_received ( :warn ) . with ( a_string_matching ( /The 'immediate_hydration ' feature requires/ ) )
397397 end
398398 end
399399
400- context "when Pro license is NOT installed and global force_load is true" do
400+ context "when Pro license is NOT installed and global immediate_hydration is true" do
401401 subject ( :react_app ) { react_component ( "App" , props : props ) }
402402
403403 before do
404404 allow ( ReactOnRails ::Utils ) . to receive ( :react_on_rails_pro_licence_valid? ) . and_return ( false )
405405 end
406406
407407 around do |example |
408- ReactOnRails . configure { |config | config . force_load = true }
408+ ReactOnRails . configure { |config | config . immediate_hydration = true }
409409 example . run
410- ReactOnRails . configure { |config | config . force_load = false }
410+ ReactOnRails . configure { |config | config . immediate_hydration = false }
411411 end
412412
413413 it { is_expected . to include ( badge_html_string ) }
414414 end
415415
416- context "when Pro license is NOT installed and force_load is false" do
417- subject ( :react_app ) { react_component ( "App" , props : props , force_load : false ) }
416+ context "when Pro license is NOT installed and immediate_hydration is false" do
417+ subject ( :react_app ) { react_component ( "App" , props : props , immediate_hydration : false ) }
418418
419419 before do
420420 allow ( ReactOnRails ::Utils ) . to receive ( :react_on_rails_pro_licence_valid? ) . and_return ( false )
@@ -428,8 +428,8 @@ def helper.append_javascript_pack_tag(name, **options)
428428 end
429429 end
430430
431- context "when Pro license IS installed and force_load is true" do
432- subject ( :react_app ) { react_component ( "App" , props : props , force_load : true ) }
431+ context "when Pro license IS installed and immediate_hydration is true" do
432+ subject ( :react_app ) { react_component ( "App" , props : props , immediate_hydration : true ) }
433433
434434 before do
435435 allow ( ReactOnRails ::Utils ) . to receive_messages (
@@ -475,8 +475,8 @@ def helper.append_javascript_pack_tag(name, **options)
475475 allow ( Rails . logger ) . to receive ( :warn )
476476 end
477477
478- context "when Pro license is NOT installed and force_load is true" do
479- subject ( :react_app ) { react_component_hash ( "App" , props : props , force_load : true ) }
478+ context "when Pro license is NOT installed and immediate_hydration is true" do
479+ subject ( :react_app ) { react_component_hash ( "App" , props : props , immediate_hydration : true ) }
480480
481481 before do
482482 allow ( ReactOnRails ::Utils ) . to receive ( :react_on_rails_pro_licence_valid? ) . and_return ( false )
@@ -487,8 +487,8 @@ def helper.append_javascript_pack_tag(name, **options)
487487 end
488488 end
489489
490- context "when Pro license IS installed and force_load is true" do
491- subject ( :react_app ) { react_component_hash ( "App" , props : props , force_load : true ) }
490+ context "when Pro license IS installed and immediate_hydration is true" do
491+ subject ( :react_app ) { react_component_hash ( "App" , props : props , immediate_hydration : true ) }
492492
493493 before do
494494 allow ( ReactOnRails ::Utils ) . to receive_messages (
@@ -504,7 +504,7 @@ def helper.append_javascript_pack_tag(name, **options)
504504 end
505505
506506 describe "#redux_store" do
507- subject ( :store ) { redux_store ( "reduxStore" , props : props , force_load : true ) }
507+ subject ( :store ) { redux_store ( "reduxStore" , props : props , immediate_hydration : true ) }
508508
509509 let ( :props ) do
510510 { name : "My Test Name" }
@@ -533,8 +533,8 @@ def helper.append_javascript_pack_tag(name, **options)
533533 allow ( Rails . logger ) . to receive ( :warn )
534534 end
535535
536- context "when Pro license is NOT installed and force_load is true" do
537- subject ( :store ) { redux_store ( "reduxStore" , props : props , force_load : true ) }
536+ context "when Pro license is NOT installed and immediate_hydration is true" do
537+ subject ( :store ) { redux_store ( "reduxStore" , props : props , immediate_hydration : true ) }
538538
539539 before do
540540 allow ( ReactOnRails ::Utils ) . to receive ( :react_on_rails_pro_licence_valid? ) . and_return ( false )
@@ -544,12 +544,12 @@ def helper.append_javascript_pack_tag(name, **options)
544544
545545 it "logs a warning" do
546546 store
547- expect ( Rails . logger ) . to have_received ( :warn ) . with ( a_string_matching ( /The 'force_load ' feature requires/ ) )
547+ expect ( Rails . logger ) . to have_received ( :warn ) . with ( a_string_matching ( /The 'immediate_hydration ' feature requires/ ) )
548548 end
549549 end
550550
551- context "when Pro license is NOT installed and force_load is false" do
552- subject ( :store ) { redux_store ( "reduxStore" , props : props , force_load : false ) }
551+ context "when Pro license is NOT installed and immediate_hydration is false" do
552+ subject ( :store ) { redux_store ( "reduxStore" , props : props , immediate_hydration : false ) }
553553
554554 before do
555555 allow ( ReactOnRails ::Utils ) . to receive ( :react_on_rails_pro_licence_valid? ) . and_return ( false )
@@ -558,8 +558,8 @@ def helper.append_javascript_pack_tag(name, **options)
558558 it { is_expected . not_to include ( badge_html_string ) }
559559 end
560560
561- context "when Pro license IS installed and force_load is true" do
562- subject ( :store ) { redux_store ( "reduxStore" , props : props , force_load : true ) }
561+ context "when Pro license IS installed and immediate_hydration is true" do
562+ subject ( :store ) { redux_store ( "reduxStore" , props : props , immediate_hydration : true ) }
563563
564564 before do
565565 allow ( ReactOnRails ::Utils ) . to receive_messages (
0 commit comments