David Zhang
2011-Jun-30 00:54 UTC
How do you test for something in a certain area of the page with RSpec / Capybara? (view test)
I''m used to doing it "displays the controls link" do render rendered.should have_selector("a#controls") end ..or using rendered.should have_content, but how would you test for something specifically in an area of the page? e.g. rendered.should have_content("Admin") in the "div#logo_area" or something? I kind of wish there were many clear examples online... -- 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/-/iJ8DxcqjshsJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.