Module: Factory

Defined in:
lib/factory_girl/deprecated.rb

Class Method Summary collapse

Class Method Details

.const_missing(name) ⇒ Object


11
12
13
14
15
16
17
# File 'lib/factory_girl/deprecated.rb', line 11

def self.const_missing(name)
  if FactoryGirl.const_defined?(name)
    FactoryGirl.const_get(name)
  else
    super(name)
  end
end

.method_missing(name, *args, &block) ⇒ Object


2
3
4
5
6
7
8
9
# File 'lib/factory_girl/deprecated.rb', line 2

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