1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot.git synced 2022-11-09 11:43:51 -05:00
thoughtbot--factory_bot/lib/factory_girl/deprecated.rb

18 lines
438 B
Ruby

module Factory
def self.method_missing(name, *args, &block)
if FactoryGirl.respond_to?(name)
$stderr.puts "DEPRECATION WARNING: Change Factory.#{name} to FactoryGirl.#{name}"
FactoryGirl.send(name, *args, &block)
else
super(name, *args, &block)
end
end
def self.const_missing(name)
if FactoryGirl.const_defined?(name)
FactoryGirl.const_get(name)
else
super(name)
end
end
end