I'm testing my signup page, and I want to minimize the duplication of the fill_in code for filling in the form fields and testing how my page reacts when someone forgets to enter input.
fill_in "....", with: "abc123" Any tricks of doing this? Say I have 10 fill_in calls, so say I want to test to make sure the form fails if any combination of the last 4 fields are missing. I was thinking of putting the first 6 fill_in calls into a method, and then calling that method: it "should ..." do enter_first_6 # now enter 3 of the 4 and verify end it "should ..." do enter_first_6 # now enter a different combination of the last 4 fields end I haven't tested this yet, just brainstorming, any other advise? I wish things worked liked attribute hashes where you could just call .merge and change the default set.
_______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users