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 travel_to is used with a block (e.g. in an around hook), the block is being removed from the auto-corrected code, despite freeze_time also accepting a block
Original code:
around do |example|
travel_to(Time.current, &example)
end
Fixesrubocop#764.
This PR fixes an incorrect autocorrect for `Rails/FreezeTime` when
using `travel_to` with an argument of the current time and proc argument.
When
travel_to
is used with a block (e.g. in anaround
hook), the block is being removed from the auto-corrected code, despitefreeze_time
also accepting a blockOriginal code:
Expected behavior
Correct to
Actual behavior
RuboCop version
The text was updated successfully, but these errors were encountered: