开发者

A better way to build factory using factory_girl in cucumber

I am using cucumber and factory_girl in a rails 2.3.9 project.

Here is one of the givens in one of my features.

Given a user with first_name "Mary" and last_name "Jane"

I started building the regex where I could capture following items.

model = user 
first_name = "Mary"
last_name = "Jane"
Factory(:user, :first_name => 'Mary', :last_name => "Jane")

Given how popular cucumber and factory_girl are, I'm sure there must be a better way rather than me reinv开发者_开发技巧enting the wheel.

What's a good solution?


Got it

http://robots.thoughtbot.com/post/284805810/gimme-three-steps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜