[rspec-users] How to write a step for a feature with a select control
lists at ruby-forum.com
Tue Sep 16 10:55:23 EDT 2008
David Chelimsky wrote:
> 2. add the data in the current step
> When(/^I pick "(.*)" from (.*)$/) do |option_value, field_name|
> selects option_value, :from => field_name
HI David, I tried the method above but I am getting "You have a nil
object when you didn't expect it"
I can see that the following line is creating a new ArticleCategory with
:name => "My article category" (BTW is it just coincidence that I have
the field :name in my Article category table or is this a convention I
should be following anyway?)
But I don't see where this new ArticleCategory is getting bound to the
Posted via http://www.ruby-forum.com/.
More information about the rspec-users