Comments (5)
@zenspider that's a little disingenuous. Yes, Minitest
has been around for a long time, but MiniTest
has been stable and never caused deprecation warnings, so old gems of course are still using it-- what would cause them to update?
To be clear, I have zero issue with this API change. My problem is that it was shipped without a major version bump, which breaks applications with even pessimistic dependency versions (e.g. gem 'minitest', '~> 5.16'
). Semantic versioning is a contract between maintainers and users; a way to give maintainers the freedom to make changes like this as they see fit while communicating them to users and giving them a chance to opt in to those updates (and update their code) as needed and on their schedule.
Which makes me ask again: does minitest use semantic versioning? Or should we be locking our minitest dependency versions down?
from minitest.
from minitest.
I'm seeing the same with puppet's beaker tests:
An error occurred while loading ./spec/acceptance/class_spec.rb.
Failure/Error: require 'beaker'
NameError:
uninitialized constant MiniTest
Did you mean? Minitest
...
from minitest.
I got this with Minitest Spec
<path>/Ruby32-x64/lib/ruby/gems/3.2.0/gems/minitest-hooks-1.5.0/lib/minitest/hooks/default.rb:3:in `<top (required)>': uninitialized constant MiniTest (NameError)
MiniTest::Spec.register_spec_type(//, Minitest::HooksSpec)
^^^^^^
Did you mean? Minitest
from <internal:<path>/Ruby32-x64/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:<path>/Ruby32-x64/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
Workaround - Downgrading Minitest to v5.18.1 works for now.
from minitest.
"Disingenuous" is titling this issue "removal of MiniTest compatiblity layer".
Mocha has known about the name change for over a decade and yet persists (even after doing a "fix" today) on using the old namespace.
Real fix:
- Don't use MiniTest.
Legitimate workarounds:
export MT_COMPAT=1
- `require "minitest/unit" in your test_helper / whereever.
- and I suppose pinning back to
5.18.1
if you have some esoteric reason why you can't do any of the others.
from minitest.
Related Issues (20)
- undefined method 'context' when running a spec file HOT 2
- MiniTest vs Minitest HOT 4
- [Feature Request] Running single test and single file in most sophisticated way. HOT 2
- Add mutex_m as a gem dependency HOT 3
- Is it possible to stub the SingletonClassMethods#instance method of a class that includes the Singleton module? HOT 1
- Feature request for Mock#verify to accept a custom message arg HOT 5
- Test doubles in Minitest HOT 2
- Add option for relative path output of test failures HOT 4
- Idea for catching outdated stubs HOT 2
- Raise an exception when no tests are found HOT 2
- Have the changes in the git tag and/or the release on GitHub? HOT 10
- NoMethodError for parallel tests HOT 1
- skip_all option? HOT 2
- No relative test path output if `SyntaxError` is encountered HOT 2
- The added "did you mean" output if your `--name` filter matches nothing breaks the Minitest behaviour for multiple runs of the `Minitest.run` method HOT 6
- Skipped tests while building, "not yet" HOT 6
- Is 5.22.3 tag missing? HOT 2
- -Werror mode? - Turn warnings into errors HOT 2
- minitest/spec doesn't play well with rails in parallel tests HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minitest.