Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Conversation

cupakromer
Copy link
Member

Follow up to #1466 for 2-99

Using 4.7.x instead of 5.x to keep the cucumber version happy.
These features are the only ways to ensure the proper integration of
minitest and test/unit compatibility between versions. The specs do not
load the libs as that would pollute the other specs.
- Deprecate support for the `stdlib` expectation framework
- Include `test_unit`
- Include `minitest`
- In specs treat previous `stdlib` as `minitest`; except those
  confirming backwards compatibility
- Add support for the minitest + test/unit combos.

  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.

  The newer Ruby versions (1.9+) use test/unit as a light shim around
  minitest. Due to this, they load `MiniTest`, note the upcase on
  'Test', when test/unit is loaded.

  If either Ruby 1.8 is used or the 'test_unit' gem is loaded,
  'minitest' is not be loaded.

  If the Minitest 5.x gem is loaded, it shims over `MiniTest` using the
  new constant `Minitest` (currently for backwards compatibility with
  Ruby core it aliases itself with `MiniTest`).

  The only situation where support for Minitest 5.x is required, is if
  the Minitest 5.x gem is loaded.

RSpec 3.x does not provide explicit support for Minitest 4.x. However,
due to differences in `require` paths, we 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).
@cupakromer
Copy link
Member Author

2-99 deprecation counterpart to #1466

@@ -45,7 +45,8 @@ Feature: configure expectation framework
When I run `rspec example_spec.rb`
Then the examples should all pass

Scenario: configure test/unit assertions (passing examples)
@deprecated
Copy link
Member

Choose a reason for hiding this comment

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

What purpose does this tag serve?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nothing other than to help call it out in the docs.

@myronmarston
Copy link
Member

LGTM.

myronmarston added a commit that referenced this pull request Apr 25, 2014
Deprecate `expect_with :stdlib` in favour of `expect_with :test_unit` and `expect_with :minitest`
@myronmarston myronmarston merged commit 90165df into 2-99-maintenance Apr 25, 2014
@myronmarston myronmarston deleted the split-expect_with-stdlib-2-99 branch April 25, 2014 01:39
# RUBY_VERSION we need to check ancestors.
begin
# MiniTest is 4.x
# Minitest is 5.x
Copy link
Member

Choose a reason for hiding this comment

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

Same nonsensical comment as the other PR

yujinakayama pushed a commit to yujinakayama/rspec-monorepo that referenced this pull request Oct 6, 2021
…ct_with-stdlib-2-99

Deprecate `expect_with :stdlib` in favour of `expect_with :test_unit` and `expect_with :minitest`

---
This commit was imported from rspec/rspec-core@90165df.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants