meilisearch / meilisearch-rails

Meilisearch integration for Ruby on Rails
https://www.meilisearch.com
MIT License
308 stars 47 forks source link

Use factory_bot to create records in the test suite #297

Open ellnix opened 1 year ago

ellnix commented 1 year ago

Description FactoryBot would remove a lot of the hassle of maintaining ActiveRecord objects used in various tests.

Other Most of the time when testing we do not care about the particular values of a record's attributes, rather we want to make assertions around its presence and logic. FactoryBot would abstract the creation of valid record objects which would make the test suite easier to maintain.