You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a project where MiniTest and rspec-mocks, rspec-expectations are both available in the Gemfile. However we have RSpec disabled as we do not use RSpec assertions in Cucumber. This is causing an issue with cucumber-rails where it tries to load RSpec expectations and matchers regardless of them being necessary.
Expected Behavior
Tests run fine without RSpec getting loaded when the Gemfile has require: false for those libraries.
Current Behavior
assert_equal with capybara fails due to rspec-expectations changing its behavior from vanilla minitest.
Possible Solution
Changing line the lib/rspec.rb file to check for defined?(RSpec::Mock) would allow for these two libraries to co-exist without causing a conflict.
The text was updated successfully, but these errors were encountered:
As an update to any new contributor / interested party. The main issue with this is that we assume you want to use rspec. As such it isn't required to enable this by the user.
Given the use-case here is to have combinations of gems existing but not functional. One plan of attack (Maybe not the best), is to simply remove all testing requirements. This would require changes of gem packages, require statements - probably meaning a major version bump.
Summary
I am working on a project where MiniTest and
rspec-mocks
,rspec-expectations
are both available in the Gemfile. However we have RSpec disabled as we do not use RSpec assertions in Cucumber. This is causing an issue withcucumber-rails
where it tries to load RSpec expectations and matchers regardless of them being necessary.Expected Behavior
Tests run fine without RSpec getting loaded when the Gemfile has
require: false
for those libraries.Current Behavior
assert_equal
with capybara fails due torspec-expectations
changing its behavior from vanillaminitest
.Possible Solution
Changing line the lib/rspec.rb file to check for
defined?(RSpec::Mock)
would allow for these two libraries to co-exist without causing a conflict.The text was updated successfully, but these errors were encountered: