minitest/spec doesn't play well with rails in parallel tests
woto opened this issue · comments
Hello, not sure where I should bug report. It seems there is a bug in parallel testing in minitest or somewhere in Rails. I've made clean demo https://github.com/woto/Demo/commits/main
1.
rails new Demo
Commit: init
2.
rails g model Page title:string
Commit: feat: add page model
3.
Add 50 tests using describe
and it
features. And add require "minitest/autorun"
to test_helper.rb
Commit: test: add 50 model tests
At this moment all tests are passes.
output.log
4.
Add 1 more test.
Commit: test: since this commit the tests are fail
At this moment all tests are broken. Rails activate mechanism of parallel tests.
output.log
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
Rails 7.1.3.2
minitest 5.22.3
Initially I tried to debug but looks like code inside it
even do not run.
Is there anything else I can do to help you figure out what the problem is?
Thank you.
up. The problem also reproduces in rails --edge version e58d59ce489f
Rails doesn't support the Minitest Spec DSL out of the box. Take a look at the minitest-rails or minitest-spec-rails gems which provide slightly different approaches for enabling the Spec DSL in a Rails application.