Make sure debug is available in tests#200
Conversation
This is just a small quality of life thing that makes sure the debug gem is available when running tests. I tested this by putting binding.b in a test file and running bin/test-unit and after this change by binding.b is caught.
flavorjones
left a comment
There was a problem hiding this comment.
Good catch! Should that whole block be both development and test?
Gemfile
Outdated
| @@ -7,10 +7,13 @@ gemspec | |||
| group :development do | |||
There was a problem hiding this comment.
Shouldn't this entire block be group :development, :test?
There was a problem hiding this comment.
I tried that originally but for some reason that I can't figure out this completely breaks the integration tests. If you add the whole block to development and test and then run bin/test-integration many tests fail in a random way (different tests will fail for different runs). Haven't dug into why yet though... 🤷♂️
There was a problem hiding this comment.
Ah, this fixes the integration tests for me:
diff --git a/Gemfile b/Gemfile
index d1591813..f57447e9 100644
--- a/Gemfile
+++ b/Gemfile
@@ -4,11 +4,11 @@ source "https://rubygems.org"
gemspec
-group :development do
+group :development, :test do
gem "rails", github: "rails/rails", branch: "main"
gem "sqlite3", "2.7.4"
gem "debug", "1.11.0"
- gem "minitest-parallel_fork", "2.1.0"
+ gem "minitest-parallel_fork", "2.1.0", require: false
end
group :rubocop doThere was a problem hiding this comment.
Good catch! I tried that out and it works for me too. Thanks!! Updated!
|
Thank you! |
This is just a small quality of life thing that makes sure the debug gem is available when running tests.
I tested this by putting binding.b in a test file and running bin/test-unit. Before this change my debugger wasn't caught but now it is!