dashbitco / mox

Mocks and explicit contracts in Elixir
1.35k stars 77 forks source link

doctest #38

Closed MeterSoft closed 6 years ago

MeterSoft commented 6 years ago

Is it possible stub doctest? I need stup HTTPpoison inside doctests

josevalim commented 6 years ago

@MeterSoft if you call doctest after you import Mox, then the Mox helpers will be available but I don't think that's recommended. Doctests are about documentation first. If you need to have complex setup in them, it is probably best to not rely on doctest and rely on simpler code samples instead.