vendredi 22 mai 2015

If I swap out Postgres for SQLite in my Rails test suite, is it going to cause problems?

I've seen people suggest that SQLite is a good option for running a test suite because it's faster. This seems like a good thing, and I want faster tests. However, I'm currently using Postgres because it's what I use in production and it seems like a bad idea to have a test environment that differs from production in such a significant way.

Given that I am using Rspec and Cucumber with Rails 4, is there any risk that switching my test suite to SQLite will cause errors to emerge, or maybe hide errors that I will not pick up? Essentially, it it totally transparent from ActiveRecord's point of view so that I can use it as a drop-in replacement?

I am not aware of any Postgres-specific code, although I am using some complex queries in places via scopes.

Aucun commentaire:

Enregistrer un commentaire