-
Notifications
You must be signed in to change notification settings - Fork 10
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
Disables Minitest when someone tries to explicitly enable autorun #2
Conversation
Actually, this doesn't quite fix the issue I'm seeing with Rails 4 and cucumber as I initially thought. Going to dig some more. |
Thanks for your efforts Andy. @tooky and I did have a go at this scenario when we first build multi_test, but we decided in the end that we can't make it entirely idiot-proof. Why would anyone have such a require statement in with their cucumber run? Is it baked into Rails 4 somehow? |
Yah, I'm seeing Minitest autorun under Rails 4 in Cucumber 1.3.3. I'll push up a small Rails app that demonstrates the problem soon if I'm not able to find the root cause. |
Just to respond to the "baked into Rails 4" question:
So... yes? Apparently if you ask Rails for test help, it invokes MiniTest. |
@eostrom this looks good to me. @mattwynne all this does is to disable minitest in the same way as testunit is disabled. After all, isn't that the whole point of this gem? |
@aslakhellesoy yes, but I had not considered the use case where there was an explicit require of the autorun file to be a sane one. I'll fix it. |
I've shipped MultiTest 0.0.2 and Cucumber 1.3.5 which should have this fixed. Please test and let me know how you get on. |
This doesn't seem to solve the problem I was hoping it would (minitest runs On Fri, Jul 19, 2013 at 4:40 AM, Matt Wynne [email protected]:
|
Thanks Erik. Do you know which exact version of minitest you're using? |
minitest 4.7.5. On Fri, Jul 19, 2013 at 11:24 AM, Matt Wynne [email protected]:
|
Right, the code here didn't actually stop Minitest as I would have expected. I haven't had time to dig deeper yet, but I suspect an issue with what code is loaded and run first. |
@alindeman I used different code to you. As far as I could tell, the @eostrom it passes this test: https://github.com/cucumber/multi_test/blob/master/test/scenarios/require_activesupport_testing_autorun.rb so I'm surprised/bummed it doesn't work. |
Is there anything we can do in cucumber-rails to change the way we require the rails testing support? Or can we perhaps look at getting a patch into rails which gives you the opportunity not to require autorun? |
@eostrom I've just tested it with a fresh Rails 4.0 app. If I use Cucumber 1.3.4 and pin MultiTest to v0.0.1 I see Minitest run. If I pin MultiTest to v0.0.2, MiniTest doesn't run anymore. Is it possible I just made a mistake with the gem version declaration, and your version MultiTest hasn't upgraded from 0.0.1? |
@tooky I haven't looked, TBH. I thought it would be easier to just fix it up on our side. |
MiniTest still runs. So, some difference between your fresh Rails app and my slightly stale one.... Tried rearranging the gems in Gemfile to try to get things loaded before we override them:
No luck. I can dig deeper later. For Googlers' sake, the symptom I'm trying to treat is:
after the Cucumber tests finish. Or, if I don't use
|
@eostrom if there's any chance you can pare it down to a bare-bones Rails app that reproduces it, I'm sure we'll be able to crack it. |
Another test case (if you need one): I ran across another Cucumber issue yesterday (7/9/2013) with the latest Cucumber gem release (1.3.3). If possible, I would appreciate you looking into it. The repo is the ATLRUG (Atlanta Ruby User Group) web site.
UPDATE: Tried it with 1.3.5 and still got the message. |
@mattwynne It seems that even the stable release of cucumber-rails does not run anymore. I'm getting the same errors when trying to run the tests locally, which they were running ok before. Even the branch used for trying with rails 4 is the same. |
I agree. fails on rails 4 |
Just came across this after hitting the same errors mentioned. I added the documented lines into
Re-ran I'm currently using the following (relevant) gems on this new Rails 4 app:
e.g., It works properly for me (thanks to all who made this so easy, good luck to those still not finding success) |
I'm going to close this issue as I think that MultiTest is behaving as expected. The issue is caused when MiniTest is required after MultiTest.disable_autorun has been called. @stevenhaddox's fix addresses this by re-running |
So @tooky - any idea what needs to be done to fix cucumber/cucumber-rails#252 and cucumber/cucumber-rails#253? |
See [this](cucumber/multi_test#2 (comment)) for more info.
No description provided.