mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-08 22:37:57 -05:00
We can't just "swap" those model properties, as that sets instance vars on the classes that get reverted to their "previous" value, which ends up leaving the instance vars set as `nil`. However, our logic for those model/class properties actually checks for `defined?` as a way to override them, and delegates up to `Devise` global config if they are not defined, so leaving instance vars back with `nil` values isn't enough, we need to actually remove them. This introduces a new test helper specifically for overriding those model configs so that we can do proper cleanup.