forked from thoughtbot/factory_bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Cucumber Helpers
Cody Norman edited this page Aug 17, 2015
·
3 revisions
More info: here
The Getting_Started documentation to add require 'factory_girl/step_definitions'
to your features/env.rb file gives you a few glorious step definitions... for free!
Given the following wikis exist:
|title|body|
|First Wiki|Not much|
|Second Wiki|Some|
|Third Wiki|Much More|
Creates the associated factories from the table.
Given a Wiki exists
Simply creates the wiki factory.
Given 6 Wikis exists
English lesson: FactoryGirl should make x6 Wiki factories.
Given a Wiki exists with a title of "First Wiki"
Creates a wiki factory but with the :title column-name being set to "First Wiki"
Given 6 Wikis exist with a title of "First Wiki"
Very nicely creates x6 wiki factories all with the :title column being set to "First Wiki"