Search code examples
erlanggen-servereunit

How to test gen_server internal state with eunit


Is it possible to inspect the internal state of a gen_server after a callback function has been called? I would rather not change the API of my server here.


Solution

  • You could use sys:get_state/1 which works nicely with all gen's.