I would leave before I would spy. For me, trust is the most important part of a relationship - without trust, the rest isn't worth the effort.
Maybe my wife is cheating - but I will act as if I can trust here completely until I have no other choice.
I would not leave my wife if she spied on me - but if I found out for sure, it would badly hurt the relationhsip. If I found out for sure that she was spying on me to try to catch me cheating, I would feel that gave me a right to cheat as long as I could get away from it. After all without trust, it is just a game to see what you can get away with.
But - I am not going to try to catch her spying - that in itself would be spying.