Sphinx Thinking Search Results in Rails Minitest

Should someone cover tests of sphinx search results in tests?

What I thought was, "The Sphinx mindset is a gem that is widely used and tested by many users and contributors. So why should we repeat it in our applications."

+3


source to share


1 answer


I find it always good to understand that the code (TS in this case) is up to you and is well tested. Convince yourself to test the inside of the TS cap that you are using and you will catch regression.

Next, I think you have the right attitude. More importantly, unit testing depends on third party libraries or services, and is generally a bad idea, since you would (inadvertently) test your system. To cover TS integration in your application, you should write some integration / end-to-end tests that emphasize the entire infrastructure. The latter is generally slow and can be a little cumbersome, but it also makes a big difference. Also, it is important that your unit tests and integration tests are separate, so you can only run the integration tests before deployment, or run it in CI.



NTN,

+2


source







All Articles