In my active record model I have declared a ‘before_save’ callback, that
populates other fields before saving the data. However I am finding all
my unit test cases are breaking because it seems the ‘before_save’
callback is not getting called during a unit test run? In fact I have to
provide the missing filed in unit test fixture yml file.
How can I make the model behave the same in the unit test run as it does
when I create and save a model object from the rails console?