Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation Steps #6

Open
bmulholland opened this issue Jun 2, 2021 · 2 comments
Open

Installation Steps #6

bmulholland opened this issue Jun 2, 2021 · 2 comments

Comments

@bmulholland
Copy link

bmulholland commented Jun 2, 2021

It wasn't obvious how to install & use this, so recording my steps here:

  1. Add to Gemfile for test and development groups: gem "turbo_test"
  2. Add test env number to database.yml, just like with parallel_tests: https://github.com/grosser/parallel_tests#add-to-configdatabaseyml
  3. Set that env for each worker by creating a new file turbo_test.rb at the project root, with (via Possible incompatibility w/ other gems that work using "parallel_tests" #4 (comment)):
ENV["RAILS_ENV"] = "test"

worker do |index|
  index = index + 1
  ENV['TEST_ENV_NUMBER'] = index == 1 ? "" : index.to_s

  # create a database for each worker
  system("bin/rails", "db:drop", "db:create", "db:migrate")
end
  1. Run with bundle exec turbo_test
@ioquatix
Copy link
Owner

ioquatix commented Jun 2, 2021

Yes, that looks acceptable to me. Did it work as expected?

@bmulholland
Copy link
Author

Not yet, because databases did not exist. See #8 for steps necessary before turbo_test can be run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants