views:

36

answers:

1

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 reinventing the wheel.

What's a good solution?