In some cases it is useful to stub a component in your tests. To enable this, dry-system provides a test mode,
in which a container will not be frozen during finalization. This allows you to use stub API to stub a given component.
configure do
config.root = Pathname('./my/app')
end
end
Application.enable_stubs!
Application.stub('persistence.db', stubbed_db)
Typically, you want to use enable_stubs! in a test helper file, before booting your system.