I'm trying to use Capybara to test this.  I have a step that goes


    When I select "Price Chopper" from "Organization"


And the step definition is 


When /^(?:|I )select "(.+)" from "(.+)"$/ do |value, field|

  select(value, :from => field)

end


For some reason, I keep getting the error:


cannot select option, no select box with id, name, or label 'Organization' 
found (Capybara::ElementNotFound)

      (eval):2:in `select'


… although my view is


 <label>Organization</label>

<%= collection_select :restaurant, :organization_id, Organization.all, :id, 
:name, { :prompt => "[Select organization]" } %>



Shouldn't this work?  The label is "Organization"!

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/VS1C-NuAYbQJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to