1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot_rails.git synced 2022-11-09 11:49:18 -05:00
thoughtbot--factory_bot_rails/lib
Daniel Colson c1d0a7887b Add back loading definitions in after_initialize
We removed the call to `FactoryBot.load_definitions` in the
`after_initialize` hook in dcfc9f6 because the other changes in that
commit were causing us to sometimes call `FactoryBot.load_definitions`
after `FactoryBot.reload`.

We could have changed `FactoryBot.load_definitions` to
`FactoryBot.reload`, which is what this PR does, but it didn't seem
necessary at the time since all the tests were still passing.

We fixed a problem in 9b83f48 that was causing us to watch the root
directory of the project. This fix caused a test failure, but I ended up
changing the test in 2b7bca0 because it seemed like an unlikely
scenario.

This PR adds back the original test case. Although I do think it
unlikely, I would rather not risk making a breaking change in the next
patch release.
2019-04-14 10:50:43 -04:00
..
factory_bot_rails Add back loading definitions in after_initialize 2019-04-14 10:50:43 -04:00
generators Generate namespaced factories in a directory 2018-12-03 23:09:17 -05:00
factory_bot_rails.rb Address todos generated by rubocop for files starting with lib/factory_bot_rails (#296) 2018-09-28 14:08:56 -04:00