Description
Temporarily replaces Ruby constants inside a Minitest block, similar to RSpec's stub_const. It is useful for isolating tests that depend on constants without permanently changing global state.
Constant stubbing can hide design problems and leak between tests if cleanup fails. Keep scopes small and avoid changing constants used by unrelated code.