fastruby / next_rails

A toolkit to upgrade your next Rails application
https://www.fastruby.io/blog/upgrade-rails/dual-boot/dual-boot-with-rails-6-0-beta.html?utm_source=github&utm_medium=description&utm_campaign=github&utm_term=next-rails
MIT License
466 stars 28 forks source link

[BUG] Deprecation Tracker is not working correctly in Rails 4.2 #108

Closed JuanVqz closed 9 months ago

JuanVqz commented 12 months ago

Expected Behavior

Support Rails 4

Actual Behavior

It returns this error message

       ArgumentError:
         wrong number of arguments (given 2, expected 4)
       # /bundle/gems/next_rails-1.0.4/lib/deprecation_tracker.rb:48:in `block in track_rspec'

Possible Fix

Add support for it, According to this article, Rails 4 and before, the ActiveSupport::Deprecation.behavior only accepted 2 arguments.

https://github.com/fastruby/next_rails/blob/71f4aea4a14e36c7b3f8b31af9a1b793398d047c/lib/deprecation_tracker.rb#L77-L79

To Reproduce

  1. Install the next_rails gem in a Rails 4 app
  2. Configure the deprecation warning
  3. Run the test suite
  4. Receive the error message above

Additional Information

Wasn't sure if this is a feature or a bug :)

I will abide by the code of conduct

arielj commented 9 months ago

I am able to reproduce the problem using next_rails 1.0.4 (as reported in the logs in the description). But the issue is fixed in next_rails 1.1.0.

I think this is not a bug but just an issue with an outdated next_rails