podia / stimulus_reflex_testing

MIT License
45 stars 6 forks source link

Fix compatibility with stimulus_reflex 3.5.0.rc4 #21

Closed dacook closed 5 months ago

dacook commented 7 months ago

The latest version of StimulusReflex causes the build_reflex method to fail, due to incorrect method arguments.

All specs fail with the follow error and backtrace:

      ArgumentError:
        missing keyword: :reflex_data

      # /Users/xxxx/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/stimulus_reflex-3.5.0.rc4/lib/stimulus_reflex/reflex.rb:28:in `initialize'
      # /Users/xxxx/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/stimulus_reflex-3.5.0.rc4/lib/stimulus_reflex/cable_readiness.rb:8:in `initialize'
      # /Users/xxxx/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/stimulus_reflex_testing-0.3.0/lib/stimulus_reflex/test_case.rb:34:in `new'
      # /Users/xxxx/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/stimulus_reflex_testing-0.3.0/lib/stimulus_reflex/test_case.rb:34:in `build_reflex'

It appears due to the change here: https://github.com/stimulusreflex/stimulus_reflex/commit/3137a0f36a27dc26ee271eee5c17c3a96dce280d?diff=unified&w=1

dacook commented 5 months ago

Fixed in https://github.com/podia/stimulus_reflex_testing/pull/22