Remove backward compatibility of factories.
This commit is contained in:
parent
d52f06f380
commit
80fb38de7a
54 changed files with 261 additions and 279 deletions
|
@ -1,21 +1,3 @@
|
|||
# Backwards compatibility with the old method
|
||||
def Factory(type, *args)
|
||||
FactoryGirl.create(type, *args)
|
||||
end
|
||||
|
||||
module Factory
|
||||
def self.create(type, *args)
|
||||
FactoryGirl.create(type, *args)
|
||||
end
|
||||
|
||||
def self.new(type, *args)
|
||||
FactoryGirl.build(type, *args)
|
||||
end
|
||||
def self.attributes(type, *args)
|
||||
FactoryGirl.attributes_for(type, *args)
|
||||
end
|
||||
end
|
||||
|
||||
FactoryGirl.define do
|
||||
sequence :sentence, aliases: [:title, :content] do
|
||||
Faker::Lorem.sentence
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue