mirror of
https://github.com/thoughtbot/factory_bot.git
synced 2022-11-09 11:43:51 -05:00
parent
f32651d9b2
commit
9fcd0b6b4e
1 changed files with 2 additions and 2 deletions
|
@ -109,7 +109,7 @@ FactoryGirl.factories.each do |factory|
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^(\d+) #{human_name.pluralize} exist$/i do |count|
|
Given /^(\d+) #{human_name.pluralize} exist$/i do |count|
|
||||||
count.to_i.times { FactoryGirl.create(factory.name) }
|
FactoryGirl.create_list(factory.name, count.to_i)
|
||||||
end
|
end
|
||||||
|
|
||||||
if factory.build_class.respond_to?(:columns)
|
if factory.build_class.respond_to?(:columns)
|
||||||
|
@ -120,7 +120,7 @@ FactoryGirl.factories.each do |factory|
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^(\d+) #{human_name.pluralize} exist with an? #{human_column_name} of "([^"]*)"$/i do |count, value|
|
Given /^(\d+) #{human_name.pluralize} exist with an? #{human_column_name} of "([^"]*)"$/i do |count, value|
|
||||||
count.to_i.times { FactoryGirl.create(factory.name, column.name => value) }
|
FactoryGirl.create_list(factory.name, count.to_i, column.name => value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue