I am creating an application on ruby on rails:
After creating users, for validating users I am running below commands:
$ bundle exec rake db:migrate
$ bundle exec rake test:prepare
Both command are run properly on the rails commandLine, but when I run the below command:
$ bundle exec rspec spec/models/user_spec.rb
I am getting error below:
Warning: you should require 'minitest/autorun' instead.
Warning: or add 'gem "minitest"' before 'require "minitest/autorun"'
And I am using 4.1.1
version of rails
.
I don't understand why it comes.
Kindly suggest me, waiting for your reply.
Thanks.
More a note for posterity than anything, but this issue can also happen if you're using an older version of shoulda-matchers. You can see some discussion around this on their Github repo here, or on the rspec-rails repo here.
Update shoulda-matchers by running bundle update shoulda-matchers
. You want the latest version (or at least 2.6.2) and this message should go away.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With