Posted about 7 years ago. Visible to the public.

Protip: Clone large projects multiple times

Large projects usually have large test suites that can run for a long time.
This can be annoying as running tests blocks you from picking up the next story -- but it doesn't have to be that way!

Simply clone your project's repo twice (or even more often).

When your work on a feature branch is done, simply push that branch and check it out on your 2nd copy to run tests there.
You can pick up a new story and work on that on your "main" project directory.

If you do it right, you will even be able to run tests in both your 2nd copy and your main directory at the same time.

Here is what you'll need to do:

  1. Clone your project a 2nd time, into a new differently named directory. Example: git clone git@example.com:repo repo-copy (if your git server is slow you can also just copy the repository rsync -a repo/ repo-copy)
  2. Update your database.yml to use other test databases. Make sure you create those test databases.
  3. If there are further services (e.g. a Redis store), update your configuration for them, too (e.g. use a different Redis database ID).

Done.

Does your version of Ruby on Rails still receive security updates?
Rails LTS provides security patches for unsupported versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2).

Owner of this card:

Avatar
Arne Hartherz
Last edit:
about 7 years ago
by Kim Jahn
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Arne Hartherz to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more