Skip to content

Commit

Permalink
Fixed bug with cucumber step definitions and humanized names; fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nordringrayhide authored and jferris committed Apr 12, 2010
1 parent 22d3220 commit 206dd09
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions features/factory_girl_steps.feature
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ Feature: Use step definitions generated by factories
| name | admin |
| John | true |

Scenario: create a several instances of a factory with an underscore in its name
Given 3 admin users exist
Then I should find the following for the last user:
| admin |
| true |

Scenario: use true values when creating instances
Given the following user exists:
| name | admin |
Expand Down
2 changes: 1 addition & 1 deletion lib/factory_girl/step_definitions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def convert_human_hash_to_attribute_hash(human_hash, associations = [])
end

Given /^(\d+) #{factory.human_name}s exist$/ do |count|
count.to_i.times { Factory(factory.human_name) }
count.to_i.times { Factory(factory.factory_name) }
end

if factory.build_class.respond_to?(:columns)
Expand Down

0 comments on commit 206dd09

Please sign in to comment.