Closed kwoodhouse93 closed 6 years ago
There was a reason why we had to add a custom importer. Do all the tests pass with that default importer?
@kwoodhouse93 @matryer Implementing this fix and then running against one of my own projects indicates that it breaks the importing. Also the unit tests are failing.
However, here is an alternative implementation that helped me: https://github.com/matryer/moq/pull/45
Likely fixed by https://github.com/matryer/moq/pull/45
Yeah it's fixed my problems :).
I see in #18 that @johanbrandhorst mentioned he was getting errors that look like the one below when importing with a vendor folder.
I also encountered this issue the other day, and wanting to find a solution so I could still use
moq
, I spent a few minutes playing with the code. The result was the following minimal patch, which stopped the errors I was seeing and allowedmoq
to generate the mocks I was after.I don't have a very deep understanding of this issue, but it seems the custom importer
moq
is currently using may be outdated. The importer in the stdlib seems to work without the errors mentioned above.