-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Missing --profile option #506
Comments
You're requiring minitest/autorun somewhere aren't you? Stop doing that. |
Thank you for the reply! Actually, I'm not. Probably some gem is... Look: rafael@WALL-A:~/workspace/mezuro-standalone$ grep -lrh 'minitest/autorun'
rafael@WALL-A:~/workspace/mezuro-standalone$
rafael@WALL-A:~/workspace/mezuro-standalone$ grep -lrh "require 'minitest/autorun'" /home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/rake-10.1.0/test/support/rakefile_definitions.rb
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/rake-10.1.0/test/helper.rb
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/arel-4.0.0/test/helper.rb
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/activerecord-deprecated_finders-1.0.3/test/helper.rb
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/minitest-4.7.5/test/minitest/metametameta.rb
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/minitest-4.7.5/test/minitest/test_minitest_mock.rb
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/minitest-4.7.5/test/minitest/test_minitest_benchmark.rb
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/minitest-4.7.5/README.txt
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/rails-4.0.0/guides/bug_report_templates/active_record_gem.rb
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/rails-4.0.0/guides/bug_report_templates/active_record_master.rb
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/nokogiri-1.6.0/test/helper.rb
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/rdoc-3.12.2/lib/rdoc/test_case.rb
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/mime-types-1.23/test/test_mime_type.rb So, if this is the cause, should be rake, arel, activerecord-deprecated_finders, rails, nokogiri, rdoc and mime-types. Digging about this require you mentioned I've reached this thread: https://groups.google.com/forum/#!topic/cukes/VoLUFDbiNdc Puting a raise on the MiniTest::Unit.autorun method, as suggested, gave this stack trace: rafael@WALL-A:~/workspace/mezuro-standalone$ cucumber --backtrace --profile default
macaco (RuntimeError)
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/minitest-4.7.5/lib/minitest/unit.rb:780:in `autorun'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/activesupport-4.0.0/lib/active_support/testing/autorun.rb:5:in `<top (required)>'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/railties-4.0.0/lib/rails/test_help.rb:5:in `<top (required)>'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/cucumber-rails-1.3.0/lib/cucumber/rails.rb:11:in `<top (required)>'
/home/rafael/workspace/mezuro-standalone/features/support/env.rb:11:in `require'
/home/rafael/workspace/mezuro-standalone/features/support/env.rb:11:in `<top (required)>'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/cucumber-1.3.4/lib/cucumber/rb_support/rb_language.rb:122:in `load'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/cucumber-1.3.4/lib/cucumber/rb_support/rb_language.rb:122:in `load_code_file'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/cucumber-1.3.4/lib/cucumber/runtime/support_code.rb:180:in `load_file'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/cucumber-1.3.4/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/cucumber-1.3.4/lib/cucumber/runtime/support_code.rb:82:in `each'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/cucumber-1.3.4/lib/cucumber/runtime/support_code.rb:82:in `load_files!'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/cucumber-1.3.4/lib/cucumber/runtime.rb:183:in `load_step_definitions'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/cucumber-1.3.4/lib/cucumber/runtime.rb:42:in `run!'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/cucumber-1.3.4/lib/cucumber/cli/main.rb:47:in `execute!'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/gems/cucumber-1.3.4/bin/cucumber:13:in `<top (required)>'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/bin/cucumber:23:in `load'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/bin/cucumber:23:in `<main>'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/bin/ruby_noexec_wrapper:14:in `eval'
/home/rafael/.rvm/gems/ruby-2.0.0-p195@mezuro-standalone/bin/ruby_noexec_wrapper:14:in `<main>' So it's activesupport who is calling it. Commenting it out from activesupport-4.0.0/lib/active_support/testing/autorun.rb fixes it. I've opened this issue to ask the Rails team about it: rails/rails#11484 Thank you again. |
Thanks a lot for digging into this @rafamanzo. The reason this functionality was removed from Cucumber was that the code was gnarly and untested. We extracted the code out into a separate gem: https://github.com/cucumber/multi_test and on the way we did simplify it. It seemed to us that the use case where someone was requiring multitest/autorun as well as cucumber was an edge-case. I don't think this behaviour should be in Cucumber, but if it doesn't get removed from ActiveSupport then what we need is for someone to add that behaviour back into multi_test, with tests. |
Looks like it's necessary on Rails so it is capable of calling it's tests. And it's to important find a way to avoid this call since it affects everyone using rails 4. I'm not an specialist on it, but I'm thinking about sending a pull request to the cucumber-rails repository where the file cucumber/rails instead of requiring 'rails/test_help' requires one version of it without the require to 'active_support/testing/autorun'. How wrong is that? :) Thanks! |
I think it is broken of Rails to assume that minitest is the only testing framework you'll want to use. I haven't looked into it yet but maybe you're on to something @rafamanzo. @alindeman how are you handling this for RSpec? |
I don't think rspec-rails is triggering this somehow. What exactly causes Rails to enable Minitest's autorun? |
@alindeman see cucumber/multi_test#2 (comment) Cucumber-rails requires |
What does |
Yes, not requiring |
Also see cucumber/multi_test#2 and cucumber/cucumber-rails#253 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi!
I don't know if this was intended to not work anymore.
I've searched about this and found anything relevant about this error.
But on the versions 1.3.(3|4), when I run the tests with cucumber --profile default I get the following error:
Downgrading to 1.3.2 fixed it.
Thank you in advance!
The text was updated successfully, but these errors were encountered: