Closed sevenseacat closed 4 months ago
Did you ever end up fixing this issue? I'm running into the exact same problem in my Elixir project, though I am using IO.inspect
instead of dbg
. As you said, it makes printing out test failures fail with these protocol errors, making it incredibly difficult to debug why my tests are failing.
I didn't, unfortunately - I ended up working around it to not do it :(
Hey team Mimic 1.8.0 1.8.1 should fix this issue. Please reopen if that's not the case!
This was a super-bizarro one that I just came across! I've tried to minimize the example as much as I can.
Given a module that defines a struct, eg.
I can use that struct quite happily in tests -
but if I want to stub out a function on that module, it throws up a really confusing error
I can't work out if this is an error in displaying the struct, or actually using the struct for things. As I want to use the struct in assertions for tests, trying to print out test failures is itself raising protocol errors like this, and it's rather confusing!