Skip to content

Make sure debug is available in tests#200

Merged
flavorjones merged 3 commits intobasecamp:mainfrom
andrewmarkle:add-debug-to-test-env
Oct 4, 2025
Merged

Make sure debug is available in tests#200
flavorjones merged 3 commits intobasecamp:mainfrom
andrewmarkle:add-debug-to-test-env

Conversation

@andrewmarkle
Copy link
Contributor

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!

andrewmarkle and others added 2 commits September 24, 2025 09:33
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.
Copy link
Member

@flavorjones flavorjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Should that whole block be both development and test?

Gemfile Outdated
@@ -7,10 +7,13 @@ gemspec
group :development do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this entire block be group :development, :test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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... 🤷‍♂️

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 do

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I tried that out and it works for me too. Thanks!! Updated!

@flavorjones
Copy link
Member

Thank you!

@flavorjones flavorjones merged commit 38b666d into basecamp:main Oct 4, 2025
3 checks passed
@andrewmarkle andrewmarkle deleted the add-debug-to-test-env branch October 16, 2025 11:53
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

Successfully merging this pull request may close these issues.

2 participants