Heinz S. wrote:
I know what you mean but it really sucks to wait up to 2 mins. to run
every single test… what else can I do to speed it up?
Don’t run every single test every time. Use something like autotest to
run just the tests specific to the files you’re changing as you code.
This is just one approach.
What you don’t want to do is compromise the integrity of your testing
environment for the sake of making them faster. Fast and wrong is worse
than slow and reliable.
Another way to drastically improve performance is to make sure you only
touch the database for tests that absolutely must. Get aquatinted with a
good mocking and stubbing framework, whether that be the one built into
RSpec, or a dedicated one like Mocha. If you can perform your test with
a new (unsaved) object then do so.
When all this becomes too much to handle effectively, then it might be
time to look into a Continuous Integration (CI) system, where the test
run on a server (or set of servers) and reports back to you when you
Point is that there are many options for improving your testing
environment’s performance without compromising the quality of your
testing (as will happen if you did what you’re proposing).