FICHA · MANJARO

ruby-minitest-stub-const

Stub constants for the duration of a block in MiniTest.Similar to RSpecs stub_const

  • Library
  • LIBRARY
  • Dependency only
official+codex · reviewed · May 29, 2026 description in en

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.

Permissions

Permissions not analysed for this source yet.