Fixed bug with cucumber step definitions and humanized names; fixes

gh-48
This commit is contained in:
romanvbabenko 2010-04-11 09:14:46 +03:00 committed by Joe Ferris
parent 22d322085e
commit 206dd0984e
2 changed files with 7 additions and 1 deletions

View File

@ -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 |

View File

@ -36,7 +36,7 @@ Factory.factories.values.each do |factory|
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)