rails: Minitest with Rails 5.2.0 - Uninitialized constant Minitest::Rails::TestUnit (NameError)
While using Ruby 2.3.3
and upgrading the Rails gem from 5.1.4
to 5.2.0.beta2
, rake fails:
$ rake
.../gems/railties-5.2.0.beta2/lib/minitest/rails_plugin.rb:16:in `plugin_rails_options': uninitialized constant Minitest::Rails::TestUnit (NameError)
.../gems/ruby-2.3.3@donortools2/gems/minitest-5.10.3/lib/minitest.rb:201:in `block (2 levels) in process_args'
.../gems/ruby-2.3.3@donortools2/gems/minitest-5.10.3/lib/minitest.rb:199:in `each'
.../gems/minitest-5.10.3/lib/minitest.rb:199:in `block in process_args'
.../.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/optparse.rb:1062:in `initialize'
.../gems/minitest-5.10.3/lib/minitest.rb:169:in `new'
.../gems/minitest-5.10.3/lib/minitest.rb:169:in `process_args'
.../gems/minitest-5.10.3/lib/minitest.rb:123:in `run'
.../gems/minitest-5.10.3/lib/minitest.rb:63:in `block in autorun'
I can’t tell if the problem is withminitest 5.10.3
or Rails 5.2.0.beta2
?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 6
- Comments: 24 (11 by maintainers)
Commits related to this issue
- Show minitest options in test runner help Since #29572, minitest options are available but are no longer showed in help. This fixed to show minitest option in help as with Rails 5.1.2. **before** `... — committed to rails/rails by y-yagi 7 years ago
- Allow use of minitest-rails gem with Rails test runner Add explicit global namespace to `Rails::TestUnit::Runner` to resolve a namespace conflict between `minitest-rails` and Rails test runner. Fixe... — committed to rails/rails by y-yagi 6 years ago
- Allow use of minitest-rails gem with Rails test runner Add explicit global namespace to `Rails::TestUnit::Runner` to resolve a namespace conflict between `minitest-rails` and Rails test runner. Fixe... — committed to rails/rails by y-yagi 6 years ago
- Include fix in Rails 5-2-stable See related: https://github.com/rails/rails/issues/31324 — committed to merit-gem/merit by tute 6 years ago
- Update Ruby and Rails versions - Drops EOL'd Rails 5.0 - Mocha doesn't need to be locked to an older version - Fix deprecation around `ActiveRecord::ConnectionAdapters::SQLite3Adapter.represent_boole... — committed to merit-gem/merit by tute 6 years ago
- Update Ruby and Rails versions - Drops EOL'd Rails 5.0 - Mocha doesn't need to be locked to an older version - Fix deprecation around `ActiveRecord::ConnectionAdapters::SQLite3Adapter.represent_boole... — committed to JayarOnde/Merit_Rails by JayarOnde 6 years ago
Sorry for the inconvenience. I fixed this issue with 686f4f3. And backported to 5-2-stable 4887f97.
Monkeypatch:
fix in railties-5.2.0/lib/minitest/rails_plugin.rb:16 should be using
::Rails
@mauditecandela meanwhile I edited
gems/railties-5.2.0/lib/minitest/rails_plugin.rb
and replacedRails::TestUnit::Runner.attach_before_load_options(opts)
with::Rails::TestUnit::Runner.attach_before_load_options(opts)
, it’s working on a new 5.2 project.