eproxus / meck

A mocking library for Erlang
http://eproxus.github.io/meck
Apache License 2.0
811 stars 231 forks source link

Leave module loaded state as it was #228

Closed zsoci closed 3 years ago

eproxus commented 3 years ago

Do you think you can add tests for this? Ideally one test with a loaded module and one with an unloaded module.

zsoci commented 3 years ago

Do you think you can add tests for this? Ideally one test with a loaded module and one with an unloaded module.

Do you mean in addition to the cases that already provide full coverage for the added code? Screen Shot 2021-03-18 at 7 47 54 PM

eproxus commented 3 years ago

I think those tests are only implicitly loading the module by running cover? Not sure if there's a test that is equivalent to:

  1. load module
  2. mock module
  3. unload mock
  4. check that module is re-loaded (without calling the actual module)

Might be wrong though...

zsoci commented 3 years ago

Yes you are right, I think no tests performs step 4. I will create one.

zsoci commented 3 years ago

I think this also fixes #214

eproxus commented 3 years ago

Oh, forgot. One more request. Can you add an entry to CHANGELOG.md too under Unreleased and squash all commits into one?

zsoci commented 3 years ago

Done.

eproxus commented 3 years ago

Thanks so much! ❤️