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

Minitest cleanup #3445

Merged
merged 6 commits into from Mar 28, 2020
Merged

Minitest cleanup #3445

merged 6 commits into from Mar 28, 2020

Conversation

deivid-rodriguez
Copy link
Member

Description:

Some small code cleanups related to minitest.

Tasks:

  • Describe the problem / feature
  • Write tests
  • Write code to solve the problem
  • Get code review from coworkers / friends

I will abide by the code of conduct.

@@ -11,11 +11,6 @@
Gem::Specification.dirs.shift
end

begin
gem 'minitest', '~> 5.0'
Copy link
Member

Choose a reason for hiding this comment

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

Are we suppose to be using bundle exec rake test from now on? I'm lost why we don't need this anymore

Copy link
Member Author

Choose a reason for hiding this comment

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

I can see how you're lost because removing this is just wrong 😆. Nice catch, removing the commit.

Copy link
Member Author

Choose a reason for hiding this comment

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

@colby-swandale I ended up restoring this but removing the exception swallowing code. Since after these changes our test suite requires minitest 5.13 or higher because I removed the compatibility code, I think the exception is useful to tell users not satisfying the requirement to install a matching version. Let me know what you think.

Copy link
Member

Choose a reason for hiding this comment

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

That sounds reasonable. Would it be worth catching the exception anyway and add a friendly error message to say you need to run bundle install?

Copy link
Member Author

Choose a reason for hiding this comment

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

@colby-swandale Since our tests are run under different environments, I think I'd rather leave the raw exception in place? For example, if our tests are run from ruby-core, I don't think a bundle install suggestion would apply there. Plus, gem install minitest will fix the issue anyways without a full bundle install.

Our tests are now guaranteed to not work on older versions of minitest,
so I don't think we should swallow this activation error because it will
make it very clear for the user what the problem is if she has a
minitest version not satisfying the requirement.
Copy link
Member

@simi simi left a comment

Choose a reason for hiding this comment

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

👍

@bronzdoc bronzdoc merged commit 2bbcdcd into master Mar 28, 2020
@bronzdoc bronzdoc deleted the minitest_cleanup branch March 28, 2020 03:04
hsbt added a commit that referenced this pull request Mar 30, 2020
  These changes completely broke the test suite on ruby core repository.
@hsbt hsbt mentioned this pull request Mar 30, 2020
4 tasks
hsbt added a commit to ruby/ruby that referenced this pull request May 7, 2020
  These changes completely broke the test suite on ruby core repository.

rubygems/rubygems@84b0bea3e1
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.

None yet

4 participants