This repository was archived by the owner on Nov 30, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 752
Deprecate expect_with :stdlib
in favour of expect_with :test_unit
and expect_with :minitest
#1501
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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).
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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`
# RUBY_VERSION we need to check ancestors. | ||
begin | ||
# MiniTest is 4.x | ||
# Minitest is 5.x |
There was a problem hiding this comment.
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow up to #1466 for 2-99