Skip to content

Commit

Permalink
Deprecate allow_class_lookup
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
composerinteralia committed Jan 6, 2019
1 parent 115bd01 commit 892c093
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/factory_bot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
require "factory_bot/version"

module FactoryBot
DEPRECATOR = ActiveSupport::Deprecation.new("6.0", "factory_bot")

def self.configuration
@configuration ||= Configuration.new
end
Expand Down Expand Up @@ -82,6 +84,9 @@ class << self
:initialize_with,
:constructor,
to: :configuration

attr_accessor :allow_class_lookup
deprecate :allow_class_lookup, :allow_class_lookup=, deprecator: DEPRECATOR
end

def self.register_factory(factory)
Expand Down

0 comments on commit 892c093

Please sign in to comment.