Why doesn’t Stringex work with Mocha?
If you are getting routing issues with models using acts_as_url from Stringex, but on in your tests, and only tests that use Mocha’s stubbing methods, this is for you.
Stringex does all of its acts_as_url crunching in before_validation callbacks. If you are stubbing the :valid? method, that is your problem. Mocha’s stubbing method actually rewrites the method being stubbed, therefore, unless you stub the :valid? method to actually call it’s callbacks you will no longer get all the handy url setting done by Stringex.