Add rule 'rails_migrations_pending'#1210
Merged
scorphus merged 4 commits intonvbn:masterfrom Jul 6, 2021
Merged
Conversation
scorphus
approved these changes
Jun 30, 2021
Collaborator
scorphus
left a comment
There was a problem hiding this comment.
Looks good. Thanks.
Please consider my sugestion below.
Co-authored-by: Pablo Aguiar <[email protected]>
scorphus
requested changes
Jul 4, 2021
Comment on lines
41
to
42
| (Command("", output_env_development), "rails db:migrate RAILS_ENV=development"), | ||
| (Command("", output_env_test), "bin/rails db:migrate RAILS_ENV=test"), |
Collaborator
There was a problem hiding this comment.
Reviewing it again, I thought that the corrected command could include the one initially intended by the user.
Suggested change
| (Command("", output_env_development), "rails db:migrate RAILS_ENV=development"), | |
| (Command("", output_env_test), "bin/rails db:migrate RAILS_ENV=test"), | |
| (Command("bin/rspec", output_env_development), "rails db:migrate RAILS_ENV=development && bin/rspec"), | |
| (Command("bin/rspec", output_env_test), "bin/rails db:migrate RAILS_ENV=test && bin/rspec"), |
Make sure to use shell._and to join the commands together.
scorphus
approved these changes
Jul 6, 2021
Collaborator
scorphus
left a comment
There was a problem hiding this comment.
Good job, @abraham-chan! Thanks for contributing! ![]()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add rule to fix a common Rails issue when running tests.
Rails source code that generates the message: https://github.com/rails/rails/blob/main/activerecord/lib/active_record/migration.rb#L152
Example output on my console: