A collegue shared this code snippet that helps making sure your database/models changes don't break your seeds:
RSpec.describe 'db:seed' do
it 'works' do
expect { Rails.application.load_seed }.to_not raise_error
end
end
July 27, 2021
A collegue shared this code snippet that helps making sure your database/models changes don't break your seeds:
RSpec.describe 'db:seed' do
it 'works' do
expect { Rails.application.load_seed }.to_not raise_error
end
end
Did you like this blog post? Feel free to send me your feedback at younes.serraj@gmail.com, it'll be much appreciated!
You can also subscribe to the RSS feed .