Skip to content

[test] only load reporters when outside of rubymine test runner #97

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

honzasterba
Copy link
Contributor

Disable Minitest::Reporters when running tests in RubyMine

Motivation and Context

I want to execute tests directly in ruby mine and Minitest::Reporters is not compatible with RubyMine test runner

How Has This Been Tested?

Locally running tests in and outside of RubyMine

Breaking Changes

none

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Dev tools support

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

unless ENV["RM_INFO"]
# RubyMine does not support Minitest reporters, so we use the default reporter
Minitest::Reporters.use!(Minitest::Reporters::ProgressReporter.new)
end
Copy link
Member

Choose a reason for hiding this comment

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

There is concern about the inclusion of the RubyMine-specific environment variable "RM_INFO", which depends on the local environment. It may be worth reconsidering whether Minitest::Reporters configuration is necessary in the first place. If not, removing the use of Minitest::Reporters might be the simpler option.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Minitest::Reporters is definitely not critical to anything the test suite is doing, it's just an fancy progress bar when running the tests

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, if the appearance of the test progress isn't important, removing it might be the simplest solution.

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