Skip to content

Commit 892c093

Browse files
Deprecate allow_class_lookup
I removed allow_class_lookup entirely in 2e0b476 when removing the deprecated ability to lookup factories by class. But the upgrade to fb 5 will be a bit more smooth if we deprecate the method first.
1 parent 115bd01 commit 892c093

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/factory_bot.rb

+5
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
require "factory_bot/version"
4848

4949
module FactoryBot
50+
DEPRECATOR = ActiveSupport::Deprecation.new("6.0", "factory_bot")
51+
5052
def self.configuration
5153
@configuration ||= Configuration.new
5254
end
@@ -82,6 +84,9 @@ class << self
8284
:initialize_with,
8385
:constructor,
8486
to: :configuration
87+
88+
attr_accessor :allow_class_lookup
89+
deprecate :allow_class_lookup, :allow_class_lookup=, deprecator: DEPRECATOR
8590
end
8691

8792
def self.register_factory(factory)

0 commit comments

Comments
 (0)