@@ -23,9 +23,7 @@ class PlainReactOnRailsHelper
2323 }
2424
2525 allow ( ReactOnRails ::Utils ) . to receive_messages (
26- react_on_rails_pro? : true ,
27- react_on_rails_pro_version : "4.0.0" ,
28- rsc_support_enabled? : false
26+ react_on_rails_pro_licence_valid? : true
2927 )
3028 end
3129
@@ -388,7 +386,7 @@ def helper.append_javascript_pack_tag(name, **options)
388386 subject ( :react_app ) { react_component ( "App" , props : props , force_load : true ) }
389387
390388 before do
391- allow ( ReactOnRails ::Utils ) . to receive ( :react_on_rails_pro ? ) . and_return ( false )
389+ allow ( ReactOnRails ::Utils ) . to receive ( :react_on_rails_pro_licence_valid ? ) . and_return ( false )
392390 end
393391
394392 it { is_expected . to include ( badge_html_string ) }
@@ -403,7 +401,7 @@ def helper.append_javascript_pack_tag(name, **options)
403401 subject ( :react_app ) { react_component ( "App" , props : props ) }
404402
405403 before do
406- allow ( ReactOnRails ::Utils ) . to receive ( :react_on_rails_pro ? ) . and_return ( false )
404+ allow ( ReactOnRails ::Utils ) . to receive ( :react_on_rails_pro_licence_valid ? ) . and_return ( false )
407405 end
408406
409407 around do |example |
@@ -419,7 +417,7 @@ def helper.append_javascript_pack_tag(name, **options)
419417 subject ( :react_app ) { react_component ( "App" , props : props , force_load : false ) }
420418
421419 before do
422- allow ( ReactOnRails ::Utils ) . to receive ( :react_on_rails_pro ? ) . and_return ( false )
420+ allow ( ReactOnRails ::Utils ) . to receive ( :react_on_rails_pro_licence_valid ? ) . and_return ( false )
423421 end
424422
425423 it { is_expected . not_to include ( badge_html_string ) }
@@ -435,8 +433,7 @@ def helper.append_javascript_pack_tag(name, **options)
435433
436434 before do
437435 allow ( ReactOnRails ::Utils ) . to receive_messages (
438- react_on_rails_pro? : true ,
439- react_on_rails_pro_version : "4.0.0"
436+ react_on_rails_pro_licence_valid? : true
440437 )
441438 end
442439
@@ -482,7 +479,7 @@ def helper.append_javascript_pack_tag(name, **options)
482479 subject ( :react_app ) { react_component_hash ( "App" , props : props , force_load : true ) }
483480
484481 before do
485- allow ( ReactOnRails ::Utils ) . to receive ( :react_on_rails_pro ? ) . and_return ( false )
482+ allow ( ReactOnRails ::Utils ) . to receive ( :react_on_rails_pro_licence_valid ? ) . and_return ( false )
486483 end
487484
488485 it "adds badge to componentHtml" do
@@ -495,8 +492,7 @@ def helper.append_javascript_pack_tag(name, **options)
495492
496493 before do
497494 allow ( ReactOnRails ::Utils ) . to receive_messages (
498- react_on_rails_pro? : true ,
499- react_on_rails_pro_version : "4.0.0"
495+ react_on_rails_pro_licence_valid? : true
500496 )
501497 end
502498
@@ -541,7 +537,7 @@ def helper.append_javascript_pack_tag(name, **options)
541537 subject ( :store ) { redux_store ( "reduxStore" , props : props , force_load : true ) }
542538
543539 before do
544- allow ( ReactOnRails ::Utils ) . to receive ( :react_on_rails_pro ? ) . and_return ( false )
540+ allow ( ReactOnRails ::Utils ) . to receive ( :react_on_rails_pro_licence_valid ? ) . and_return ( false )
545541 end
546542
547543 it { is_expected . to include ( badge_html_string ) }
@@ -556,7 +552,7 @@ def helper.append_javascript_pack_tag(name, **options)
556552 subject ( :store ) { redux_store ( "reduxStore" , props : props , force_load : false ) }
557553
558554 before do
559- allow ( ReactOnRails ::Utils ) . to receive ( :react_on_rails_pro ? ) . and_return ( false )
555+ allow ( ReactOnRails ::Utils ) . to receive ( :react_on_rails_pro_licence_valid ? ) . and_return ( false )
560556 end
561557
562558 it { is_expected . not_to include ( badge_html_string ) }
@@ -567,8 +563,7 @@ def helper.append_javascript_pack_tag(name, **options)
567563
568564 before do
569565 allow ( ReactOnRails ::Utils ) . to receive_messages (
570- react_on_rails_pro? : true ,
571- react_on_rails_pro_version : "4.0.0"
566+ react_on_rails_pro_licence_valid? : true
572567 )
573568 end
574569
0 commit comments