Gems updated resolving deprecation warnings #424
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Gems and syntax were updated to remove deprecation warnings in RSpec and Mocha, fix ActionCable, and migrate to the latest versions. The rails_best_practices Gem was added and slightly improved some of the Rails code quality.
RSpec Deprecation Warnings:
The following warning was thrown after every test when using
database_cleaner
version 1.5.3:Updating the gem to
database_cleaner
1.6.2 fixed this.FactoryGirl threw the following warning when running RSpec tests:
This was fixed by replacing
factory_girl_rails
with thefactory_bot_rails gem
.Mocha Deprecation Warnings:
The syntax of client/package.json line 29 resulted in the following
warning:
Revisions fixed this.
Action Cable Broken:
Action Cable was failing with the following error in the dev server logs:
As described in this rails issue, this was fixed by rolling the
redis
gem back to version 3.3.3.Gems Updated:
Most other Gems were also updated. Updating RSpec to version 3.7.1 caused the following test failures:
Rolling back to
rspec-rails
3.6.1 resolved errors one and two, which might be related to RSpec’s version 3.7 mocks.Error three appeared to result from Capybara’s
accept_confirm
method not being found. This was fixed by upgradingcapybara-webkit
to version 1.14.0 andselenium-webdriver
to version 3.7.0rails_best_practices
The following code quality issues were flagged by this gem:
The instance variable issues were revised, a rake task was added to run
rails_best_practices
, and this issue:Was left as-is with the
config/rails_best_practices.yml
set up so that it wouldn't appear when running the Gem.In a future pull request I could move this method to the
spec/support
directory, since it seems to be used only in the test suite, if desirable.This change is