thoughtbot--factory_bot/lib/factory_bot/syntax
Daniel Colson 0f4b404569 Deprecate remaining undocumented internal methods
This commit deprecates several undocumented top-level FactoryBot
methods:

  * callbacks
  * configuration
  * constructor
  * initialize_with
  * register_sequence
  * resent_configuration
  * skip_create
  * to_create

factory_bot users are not meant to access these methods directly.
Instead they are available for internal use through the new Internal
module introduced in #1262.

---

While addressing the new deprecation warnings, I tried to make the
delegation a bit more consistent, always delegating to
`FactoryBot::Internal`.

This involved requiring "factory_bot/internal" sooner. To avoid having
to fight with the order of requires and potential circular dependencies,
I moved the default strategy and callback registration out of constants
(this is how they used to be before #1297), so it doesn't matter if
those strategies are loaded before the `Internal` module. I also deleted
a pair of tests that were using these constants - these strategies and
callbacks are covered elsewhere in our test suite, and I don't think
these tests were adding much value (they missed #1379, for example).
2020-04-23 19:35:39 -04:00
..
default.rb Deprecate remaining undocumented internal methods 2020-04-23 19:35:39 -04:00
methods.rb Deprecate/Move strategies and callback methods 2019-06-04 20:09:14 -04:00