Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minitest with Rails 5.2.0 - Uninitialized constant Minitest::Rails::TestUnit (NameError) #44

Open
tomrossi7 opened this issue Dec 4, 2017 · 3 comments

Comments

@tomrossi7
Copy link

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've tracked this back to the minitest-rails-capybara gem. Anyone have a fix?

@lostapathy
Copy link

Just linking this to the other ticket where this was found - rails/rails#31324

@bootleq
Copy link

bootleq commented Aug 30, 2019

Found with minitst-rails 5.0, bundler installs minitest-rails-capybara 0.0.2, which causes this error.

With Gemfile 'minitest-rails', '~> 3.0' (lock to ~> 3), minitest-rails-capybara 3.0.1 is installed and does work.

@blowmage
Copy link
Owner

minitest-rails-capybara support ends with minitest-rails 3.x. If you want to use minitest-rails 5.1+ you should transition to system tests. If you need to stay on Rails 5.0, I would use minitest-rails 3 and minitest-rails-capybara 3 instead of minitest-rails 5.0.

https://blowmage.com/2019/06/18/minitest-rails-releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants