to stub out
- phrasal verb
- Specialized
- During testing, developers stubbed out the payment API to simulate successful transactions without contacting the bank.
Examples
-
To isolate the module, she stubbed out several helper functions that relied on the network.
-
They are stubbing out the email service during unit tests to avoid sending real messages.
-
You can stub the method out for testing.
-
Don't forget to stub out the API calls!
-
During testing, developers stubbed out the payment API to simulate successful transactions without contacting the bank.
-
To isolate the module, she stubbed out several helper functions that relied on the network.
-
They are stubbing out the email service during unit tests to avoid sending real messages.
Synonyms
Replace a real part with a simple stand-in during tests
How Complete
- Specialized
- Specialized
- Specialized
Surface Forms
Morphology
The software sense of 'stub out' (to replace or provide a temporary placeholder implementation) is a specialized technical meaning that cannot be inferred from the literal verb 'stub' (to extinguish a cigarette) plus 'out'. The MWE derives from programming jargon (noun 'stub' = placeholder) and is not a transparent compositional extension of the given constituent senses, so a B1 learner knowing the literal words would not predict this meaning.
Etymology
Stub out in programming comes from making a short, simple piece of code called a stub that stands in for the real function while you test. So, to stub out something in code means 'to replace it temporarily with a simple fake'.