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

brew test fails on 10.13 due to different assertion class #2840

Closed
3 tasks done
mistydemeo opened this issue Jun 30, 2017 · 0 comments
Closed
3 tasks done

brew test fails on 10.13 due to different assertion class #2840

mistydemeo opened this issue Jun 30, 2017 · 0 comments

Comments

@mistydemeo
Copy link
Member

Please always follow these steps:

  • Confirmed this is a problem with running a brew command and not brew installing or the post-install behaviour of one or more formulae? If it's a formulae-specific problem please file this issue at https://github.com/Homebrew/homebrew-core/issues/new
  • Ran brew update and retried your prior step?
  • Ran brew doctor, fixed all issues and retried your prior step?

10.13 uses Ruby 2.3 as its system Ruby, with some differences in how Test::Unit's assertions work. This causes some troubles with brew test, which uses the system Ruby's Test::Unit.

Specifically, the assertions in the system Ruby 2.0 on older OSs raise a MiniTest::Assertion on assertion failure, while Ruby 2.3 in 10.13 raises a Test::Unit::AssertionFailedError. Since the MiniTest constant isn't loaded at all, brew test fails with an uninitialized constant; even if it were these exceptions can't be rescued via MiniTest::Assertion.

Steps to reproduce:

  1. Find a formula with a failing assertion (creating one if necessary).
  2. Run brew test formulaname

Expected:

The failed test is reported as expected.

Actual:

A Error: uninitialized constant Homebrew::MiniTest error is printed.

cc @MikeMcQuaid

mistydemeo added a commit to mistydemeo/brew that referenced this issue Jun 30, 2017
@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant