-
Notifications
You must be signed in to change notification settings - Fork 241
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
Strange mini-test error after guard-rspec run #308
Comments
It seems you are including 'test/unit" somewhere - directly or indirectly. And 'test/unit' works by "autorunning" itself as soon as the process is exiting (rspec, or whatever). So this means 'test/unit' is included somewhere. First, stop spring to make sure any changes will take effect, e.g. spring stop
spring status Then, I'd check your Gemfile and add "require: false" to every gem that could be causing the problem (probably just minitest), e.g. in your Gemfile: gem 'minitest', require: false If that doesn't work, check your Gemfile.lock to see if any other gem is including minitest (show your Gemfile.lock if you aren't sure). Also, I'd check for environment variables, e.g. If you still can't get rid of minitest/unit test, just rename the file:
The last option should give an error to help us find the cause. There are too many possibilities at this point, though - even with Rails 3 requiring test case through it's test helper. |
If this is an old error (related to rails/test_help), the solution may be this: Put something like this in one of your config files (before Rails is loaded): gem 'minitest'
require 'minitest/unit'
module MiniTest
class Unit
def self.autorun
end
end
end I'm not sure if this will work, but the idea is:
If it doesn't work, insert a |
Thanks! Turns out I had a rogue |
I do recall a problem like that on Rails 3 - I'm glad you got it working! |
I don't have any refs to test/unit or minitest in my code or Gemfile, but my Gemfile.lock shows Seems like Rails 4.2 pulls it in. Before I try patching autorun, can anyone comment on whether there needs to be another solution in the guard codebase? |
remove |
I just upgraded a bunch of testing gems in my Rails 3.2 app. I've upgraded to the latest
guard
(2.11.1),rspec-rails
(2.99.0),guard-rspec
(4.5.0),cucumber-rails
(1.4.2),guard-cucumber
(1.5.3), and converted fromspork
to usingspring
.Everything seems to be working. However, when I start up guard, at the end of the rspec run, it displays this error:
I don't see this error when I run rspec manually (
bin/rspec
). I also don't see this after the cucumber run. So it seems like this bug is related to guard and guard-rspec. This issue seems related, but I don't think the solution is the same.It doesn't appear to be causing any problems, but I'm still trying to solve this issue so that I don't continue to see this error message.
Here's a copy of my Guardfile:
The text was updated successfully, but these errors were encountered: