Before, I had this in my RJS template: page[''order''].replace_html :partial => ''order'' When I use assert_select_rjs as follows: assert_select_rjs :replace_html, ''order'' I get the error: No RJS statement that replaces or inserts HTML content. But when I change the RJS template to this: page.replace_html ''order'', :partial => ''order'' Then assert_select_rjs works fine. What gives? Thanks, Eric --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Eric wrote:> Before, I had this in my RJS template: > > page[''order''].replace_html :partial => ''order'' > > When I use assert_select_rjs as follows: > > assert_select_rjs :replace_html, ''order'' > > I get the error: > > No RJS statement that replaces or inserts HTML content. > > But when I change the RJS template to this: > > page.replace_html ''order'', :partial => ''order'' > > Then assert_select_rjs works fine. What gives? > > Thanks, > Eric > > > > > >You need something like (from memory) assert_select_rjs :chained_replace_html, ''order'' See the API docs for assert_select_rjs. Seem to remember there''s a bit about chained replace (but not much). HTH Chris -- ---------------------------- Autopendium :: Stuff about old cars http://autopendium.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I see... I saw that chained replace thing too, was wondering what it was for... now I knows. Thanks. On Jan 20, 2008 10:38 AM, Chris T <ctmailinglists-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> > Eric wrote: > > Before, I had this in my RJS template: > > > > page[''order''].replace_html :partial => ''order'' > > > > When I use assert_select_rjs as follows: > > > > assert_select_rjs :replace_html, ''order'' > > > > I get the error: > > > > No RJS statement that replaces or inserts HTML content. > > > > But when I change the RJS template to this: > > > > page.replace_html ''order'', :partial => ''order'' > > > > Then assert_select_rjs works fine. What gives? > > > > Thanks, > > Eric > > > > > > > > > > > > You need something like (from memory) > assert_select_rjs :chained_replace_html, ''order'' > > See the API docs for assert_select_rjs. Seem to remember there''s a bit > about chained replace (but not much). > HTH > Chris > > -- > ---------------------------- > Autopendium :: Stuff about old cars > http://autopendium.com > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---