Seed files can become invalid fast as code grows. I just had a situation where the open merge request had all tests running and passing but when I run rails db:seed
on staging server failed as the seed file did not have all the required fields for that particular model.
Is there a way we can always test for validity of the seed file?
Maybe relevant:
- I am using gitlab CI for running CI and deployment
- rails version - 5.2
- rspec version 3