-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] undefined method after_run when running Minitest version 4 #114
Comments
Here is some more information that I found for Minitest version 4.7.3. The below console results show how we can determine that the
If |
The workaround we used to solve this: # config/initializers/minitest.rb
module Minitest
def self.after_run(&block)
Minitest::Unit.after_tests(&block)
end
end |
After more investigation it turns out that a simple monkey patch is not enough to get I believe we need to investigate how to hook into the test suites for next_rails/lib/deprecation_tracker.rb Lines 36 to 53 in 4752fc9
|
Expected Behavior
Be able to use the Minitest deprecation tracker with Ruby 2.3.8 and Rails 3.2.22.5 using the Minitest gem at version 4.7.5
Actual Behavior
If I run the deprecation tracker it breaks with the following error:
vendor/bundle/ruby/2.3.0/gems/next_rails-1.3.0/lib/deprecation_tracker.rb:107:in `track_minitest': undefined method `after_run' for MiniTest:Module (NoMethodError)
Possible Fix
Add a check in the next_rails gem if the app is using Minitest v4, then instead of using
after_run
it should use the correct method (I think it wasafter_tests
).To Reproduce
Additional Information
I researched a little bit it seems like the Minitest gem at version 4.7.3 doesn't have the
after_run
method, it was initially introduced at version 5.0.0If there are more questions feel free to ping me, 👍
I will abide by the code of conduct
The text was updated successfully, but these errors were encountered: