Hdc5 rey there all..
So: I'm a little noobish, so please bear with me here.
Given cucumber/pickle/factory_girl
When I test form entry
Then I run into a problem
my scenerio is as so:
Scenerio: user fills out the registration form
Given a user exists # now here cuke 4.4 knows to hit up
factory_girl, right? (no error)
When he fills out the registration form
Then ....
So, right here I went and started a helper method for the world
object.
Plagiarizing
http://rubyflare.com/2009/10/28/pickle-my-cucumber/
module FormSubmissionHelpers
def fill_in_account_form
fill_in(" account_name", :with => "Mocra")
fill_in("account_abn", :with => "12 345 678 901")
click_button("Submit")
end
end
World(FormSubmissionHelpers)
now. that's pretty ugly and can't exactly reuse that for any other
model creation forms.
The pickle Model object doesn't have an accessible attribute hash
rigth?
Can I loop over like: fill_in("firstname", :with => Model
($1).firstname)?