Commit 628e16514eafd0e6beec108ce478b20cfb0454de
1 parent
76fde36f
Exists in
master
and in
1 other branch
another factory girl step improvement
Showing
1 changed file
with
4 additions
and
0 deletions
Show diff stats
features/step_definitions/factory_girl_steps.rb
@@ -11,6 +11,10 @@ Factory.factories.each do |name, factory| | @@ -11,6 +11,10 @@ Factory.factories.each do |name, factory| | ||
11 | Given %{^an? #{name.to_s.humanize.downcase} exists with an? #{column.name.humanize.downcase} of "([^"]*)"$} do |value| | 11 | Given %{^an? #{name.to_s.humanize.downcase} exists with an? #{column.name.humanize.downcase} of "([^"]*)"$} do |value| |
12 | Factory(name, column.name => value) | 12 | Factory(name, column.name => value) |
13 | end | 13 | end |
14 | + | ||
15 | + Given %{^an? #{name.to_s.humanize.downcase} exists with an? #{column.name.humanize.downcase} of "([^"]*)" and a "([^"]*)" of "([^"]*)"$} do |first_value, second_column, second_value| | ||
16 | + Factory(name, column.name => value, second_column.downcase.to_sym => second_value) | ||
17 | + end | ||
14 | end | 18 | end |
15 | end | 19 | end |
16 | 20 |