Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Split `expect_with :stdlib` into `expect_with :test_unit` and `expect_with :minitest` #1466
The other thing this'll need is a deprecation warning in 2.99. Actually, to deprecate this properly I think you have to backport this (but keep
We're not sure yet what minitest 6.x will entail. So we're locking the gem to a 5.x version.
- Remove support for the `stdlib` expectation framework - Include `test_unit` - Include `minitest` - In specs treat previous `stdlib` as `minitest` - Attempt to require the 'minitest' gem - Supports minitest with Ruby 1.8.7 - Supports minitest 5.x which is not part of stdlib
The whole minitest and test/unit loading is a bit complex. It depends greatly on which Ruby version is being used, and if either the 'test_unit' or 'minitest' gems are available. The newer Ruby versions (1.9+) use test/unit as a light shim around minitest. Due to this, they load minitest when test/unit is loaded. This means we should add the new `assertions` accessors when `:test_unit` is specified. However, if either Ruby 1.8 is used or the 'test_unit' gem was loaded, 'minitest' will not be loaded. In these situations we should not be adding the accessor.
RSpec 3.x does not provide explicit support for Minitest 4.x. However, due to differences in `require` paths, we do provide a fallback option in the case it is used. We are not in the business of dictating which versions our users should or should not use, nor on how they setup their load paths (i.e. bundler or other methods). There are a lot of subtle issues with the different combinations of versions of Ruby + test/unit + minitest. These can cause load and name errors. - Update the features to specifically check for our desired assertion errors; instead of allowing failures due to `NameError` or `LoadError` - Update the test/unit and minitest adapters to include fallback logic when different combinations occur