Actions
Patch #37883
closedLimit mocha version to < 2.0.0 when Ruby version is < 2.7 to avoid test error
Description
Today, I encountered the following "LoadError: cannot load such file -- ruby2_keywords" error, when executing test with ruby 2.6.
% bundle exec rails test
/Users/sanak/Build/rb/redmine42/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:291:in `require': cannot load such file -- ruby2_keywords (LoadError)
from /Users/sanak/Build/rb/redmine42/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:291:in `block in require'
from /Users/sanak/Build/rb/redmine42/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:257:in `load_dependency'
from /Users/sanak/Build/rb/redmine42/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:291:in `require'
from /Users/sanak/Build/rb/redmine42/vendor/bundle/ruby/2.6.0/gems/mocha-2.0.0/lib/mocha/mock.rb:1:in `<top (required)>'
:
- 2022/11/03: https://github.com/sanak/redmine_text_blocks/actions/runs/3350392379/jobs/5616832150#step:12:9
so, when ruby < 2.7, mocha should be < 2.0.0.
I upload a patch for that, but I am not sure whether it is enough, so reviewing it is helpful.
Files
Related issues
Actions