Harlan Crystal
2007-Feb-06 02:36 UTC
assert_select_rjs with on a page with "page.select" in it
I''m having a bunch of testing an RJS action. The action updates a DIV if it exists, but it isn''t always necessarily present on the page so I use a page.select in the RJS to check if it exists. (Is there a better way to do that?) Let''s say we have an RJS page containing: page.select("some_element_that_may_or_may_not_exist").each do |value| page.replace_html value, "something" end Writing a test like this fails: assert_select_rjs "some_element_that_may_or_may_not_exist" do ... end so does: assert_select_rjs do assert_select "some_element_that_may_or_may_not_exist", :count => 1 end I''m assuming this is because of the "page.select". Anyone know of a way to deal with this? thanks, --harlan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---