You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using `def setup` things can behave unpredictably if developers
forget to call `super`. Using the `setup do` callback form eliminates
that problem.
Partial fix for: bullet-train-co/bullet_train#1626
When using `def setup` things can behave unpredictably if developers forget to call `super`. Using the `setup do` callback form eliminates that problem.
Fixes: #1626
Looks like Bullet Train is using minitest's
def setup
anddef teardown
where users must remember to callsuper
manually.ActiveSupport::TestCase
includessetup do
(or setup :some_setup_method) andteardown do
where users won't need to remember that detail.I think we should swap to the more Rails conventional version.
References:
https://github.com/search?q=repo%3Abullet-train-co%2Fbullet_train%20%2Fdef%20setup%2F&type=code
https://github.com/search?q=repo%3Abullet-train-co%2Fbullet_train+%2Fdef+teardown%2F&type=code
cc @jagthedrummer
The text was updated successfully, but these errors were encountered: