-
-
Notifications
You must be signed in to change notification settings - Fork 327
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
bundle exec rake
runs minitest with cucumber options and raises exception
#252
Comments
Once you fix the cucumber version to 1.3.2, everything works as expected. |
Rails 4, Nokogiri and Cucumber seem to have a dependancy on Minitest 4.x... but its passing RSpec options (--profile) to Test::Unit or Minitest... Locking cucumber on version 1.3.2 didn't work for me... I've tried commenting out the 'require' lines in spec_helper.rb but this hasn't helped. (I'm on Rails 4.0.0, Ruby 2.0.0p247) |
Okay, if I run "cucumber" rather than "rake cucumber" it seems to work fine - with both cucumber 1.3.3 and 1.3.2. Is there something being loaded by rake that is linking things to Test::Unit or Minitest? |
Okay, if you provide any options to cucumber it triggers the autorun behaviour. I added this to features/support/env.rb ( before require 'cucumber/rails' ): # This is taken from here: https://groups.google.com/forum/#!topic/cukes/VoLUFDbiNdc
require 'minitest/unit'
module SurpressAutorun
attr_accessor :installed_at_exit
end
MiniTest::Unit.extend SurpressAutorun
module MiniTest
class Unit
@@installed_at_exit = false
end
end Credit goes to these guys... https://groups.google.com/forum/#!topic/cukes/VoLUFDbiNdc |
Related to #253 I'd guess. |
The fix in cucumber/multi_test#2 worked for me |
Closing as it's relevent to fix #253 |
My solution is similar to yours, @wtfiwtz, but I had to change a few details, as Minitest changed their code a little bit and env.rb was too late. I added an initializer (config/initializers/suppress_minitest.rb) with this content:
|
More details here: cucumber/cucumber-rails#252 Also, given that guard-cucumber current version does not support the most recent version of cucumber, I've choosen to remove it from the Guardfile options. I would argue that is not critical to have that running everytime there's changes, more relevant for unit tests (RSpec)
Probably an unintended side effect of extraction of autorun suppression into multi_test.
In your shell:
rails new cuke-test cd cuke-test
Edit
./Gemfile
Setup Cucumber and run tests
bundle rails g cucumber:install rake db:create db:migrate db:test:prepare bundle exec rake
Output:
Bundle:
Environment:
The text was updated successfully, but these errors were encountered: