Skip to content

Commit

Permalink
Use create_list in step definitions
Browse files Browse the repository at this point in the history
Closes #213
  • Loading branch information
nashby authored and joshuaclayton committed Oct 14, 2011
1 parent f32651d commit 9fcd0b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/factory_girl/step_definitions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def initialize(human_hash_to_attributes_hash, key, value)
end

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

if factory.build_class.respond_to?(:columns)
Expand All @@ -120,7 +120,7 @@ def initialize(human_hash_to_attributes_hash, key, value)
end

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
Expand Down

0 comments on commit 9fcd0b6

Please sign in to comment.