I''m trying to test the following code: render :update do |page| @story.destroy flash[:status] = "Story \"#{@story.title}\" has been deleted." page.redirect_to request.referer end I know that assert_redirected doesn''t work. I found this blog post from 2006 (http://www.caboo.se/articles/ 2006/2/20/assert-yourself-man-redirecting-with-rjs) and I was wondering if there''s a better/different way of achieving the same Thanks in advance, Mauro --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Nov 26, 3:20 pm, Mauro Botelho <mabot...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m trying to test the following code: > > render :update do |page| > @story.destroy > flash[:status] = "Story \"#...@story.title}\" has been deleted." > page.redirect_to request.referer > end > > I know that assert_redirected doesn''t work. >In the past i''ve used the arts plugin (http://glu.ttono.us/articles/ 2006/05/29/guide-test-driven-rjs-with-arts) in the past. Fred> I found this blog post from 2006 (http://www.caboo.se/articles/ > 2006/2/20/assert-yourself-man-redirecting-with-rjs) and I was > wondering if there''s a better/different way of achieving the same > > Thanks in advance, > > Mauro--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
The arts plug in has been incorporated into rails and I couldn''t find it anywhere anymore. And as far as I know it didn''t have this functionality either. Mauro On Nov 26, 1:23 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Nov 26, 3:20 pm, Mauro Botelho <mabot...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m trying to test the following code: > > > render :update do |page| > > @story.destroy > > flash[:status] = "Story \"#...@story.title}\" has been deleted." > > page.redirect_to request.referer > > end > > > I know that assert_redirected doesn''t work. > > In the past i''ve used the arts plugin (http://glu.ttono.us/articles/ > 2006/05/29/guide-test-driven-rjs-with-arts) in the past. > > Fred > > > I found this blog post from 2006 (http://www.caboo.se/articles/ > > 2006/2/20/assert-yourself-man-redirecting-with-rjs) and I was > > wondering if there''s a better/different way of achieving the same > > > Thanks in advance, > > > Mauro--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 26 Nov 2008, at 18:56, Mauro Botelho wrote:> > The arts plug in has been incorporated into rails and I couldn''t find > it anywhere anymore. And as far as I know it didn''t have this > functionality either. >Not quite, and yes it did. The assert_select_rjs isn''t quite the same as ARTS was. better in someways, different in others. It could/can do assert_rjs :redirect_to, :action => ''foo'' At the end of the day all that''s doing though is asserting that the output contains window.location="..." Fred> Mauro > > On Nov 26, 1:23 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: >> On Nov 26, 3:20 pm, Mauro Botelho <mabot...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m >> trying to test the following code: >> >>> render :update do |page| >>> @story.destroy >>> flash[:status] = "Story \"#...@story.title}\" has been >>> deleted." >>> page.redirect_to request.referer >>> end >> >>> I know that assert_redirected doesn''t work. >> >> In the past i''ve used the arts plugin (http://glu.ttono.us/articles/ >> 2006/05/29/guide-test-driven-rjs-with-arts) in the past. >> >> Fred >> >>> I found this blog post from 2006 (http://www.caboo.se/articles/ >>> 2006/2/20/assert-yourself-man-redirecting-with-rjs) and I was >>> wondering if there''s a better/different way of achieving the same >> >>> Thanks in advance, >> >>> Mauro > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks a lot for your response! Where could I find arts? I see that it indeed has the capability of testing for :redirect_to... The last known location http://thar.be/svn/projects/plugins/arts is not responding anymore... Mauro On Nov 26, 2:24 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 26 Nov 2008, at 18:56, Mauro Botelho wrote: > > > > > The arts plug in has been incorporated into rails and I couldn''t find > > it anywhere anymore. And as far as I know it didn''t have this > > functionality either. > > Not quite, and yes it did. The assert_select_rjs isn''t quite the same > as ARTS was. better in someways, different in others. > It could/can do assert_rjs :redirect_to, :action => ''foo'' > > At the end of the day all that''s doing though is asserting that the > output contains window.location="..." > > Fred > > > Mauro > > > On Nov 26, 1:23 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > wrote: > >> On Nov 26, 3:20 pm, Mauro Botelho <mabot...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m > >> trying to test the following code: > > >>> render :update do |page| > >>> @story.destroy > >>> flash[:status] = "Story \"#...@story.title}\" has been > >>> deleted." > >>> page.redirect_to request.referer > >>> end > > >>> I know that assert_redirected doesn''t work. > > >> In the past i''ve used the arts plugin (http://glu.ttono.us/articles/ > >> 2006/05/29/guide-test-driven-rjs-with-arts) in the past. > > >> Fred > > >>> I found this blog post from 2006 (http://www.caboo.se/articles/ > >>> 2006/2/20/assert-yourself-man-redirecting-with-rjs) and I was > >>> wondering if there''s a better/different way of achieving the same > > >>> Thanks in advance, > > >>> Mauro--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Nov 26, 8:12 pm, Mauro Botelho <mabot...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thanks a lot for your response! > > Where could I find arts? I see that it indeed has the capability of > testing for :redirect_to...seems to be a copy on github: http://github.com/richpoirier/arts/tree/master Fred> > The last known locationhttp://thar.be/svn/projects/plugins/artsis > not responding anymore... > > Mauro > > On Nov 26, 2:24 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > On 26 Nov 2008, at 18:56, Mauro Botelho wrote: > > > > The arts plug in has been incorporated into rails and I couldn''t find > > > it anywhere anymore. And as far as I know it didn''t have this > > > functionality either. > > > Not quite, and yes it did. The assert_select_rjs isn''t quite the same > > as ARTS was. better in someways, different in others. > > It could/can do assert_rjs :redirect_to, :action => ''foo'' > > > At the end of the day all that''s doing though is asserting that the > > output contains window.location="..." > > > Fred > > > > Mauro > > > > On Nov 26, 1:23 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > > wrote: > > >> On Nov 26, 3:20 pm, Mauro Botelho <mabot...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m > > >> trying to test the following code: > > > >>> render :update do |page| > > >>> @story.destroy > > >>> flash[:status] = "Story \"#...@story.title}\" has been > > >>> deleted." > > >>> page.redirect_to request.referer > > >>> end > > > >>> I know that assert_redirected doesn''t work. > > > >> In the past i''ve used the arts plugin (http://glu.ttono.us/articles/ > > >> 2006/05/29/guide-test-driven-rjs-with-arts) in the past. > > > >> Fred > > > >>> I found this blog post from 2006 (http://www.caboo.se/articles/ > > >>> 2006/2/20/assert-yourself-man-redirecting-with-rjs) and I was > > >>> wondering if there''s a better/different way of achieving the same > > > >>> Thanks in advance, > > > >>> Mauro--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
That worked!!!! Thanks a lot! Mauro On Nov 26, 3:56 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Nov 26, 8:12 pm, Mauro Botelho <mabot...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Thanks a lot for your response! > > > Where could I find arts? I see that it indeed has the capability of > > testing for :redirect_to... > > seems to be a copy on github:http://github.com/richpoirier/arts/tree/master > > Fred > > > > > The last known locationhttp://thar.be/svn/projects/plugins/artsis > > not responding anymore... > > > Mauro > > > On Nov 26, 2:24 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > wrote: > > > > On 26 Nov 2008, at 18:56, Mauro Botelho wrote: > > > > > The arts plug in has been incorporated into rails and I couldn''t find > > > > it anywhere anymore. And as far as I know it didn''t have this > > > > functionality either. > > > > Not quite, and yes it did. The assert_select_rjs isn''t quite the same > > > as ARTS was. better in someways, different in others. > > > It could/can do assert_rjs :redirect_to, :action => ''foo'' > > > > At the end of the day all that''s doing though is asserting that the > > > output contains window.location="..." > > > > Fred > > > > > Mauro > > > > > On Nov 26, 1:23 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > > > wrote: > > > >> On Nov 26, 3:20 pm, Mauro Botelho <mabot...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m > > > >> trying to test the following code: > > > > >>> render :update do |page| > > > >>> @story.destroy > > > >>> flash[:status] = "Story \"#...@story.title}\" has been > > > >>> deleted." > > > >>> page.redirect_to request.referer > > > >>> end > > > > >>> I know that assert_redirected doesn''t work. > > > > >> In the past i''ve used the arts plugin (http://glu.ttono.us/articles/ > > > >> 2006/05/29/guide-test-driven-rjs-with-arts) in the past. > > > > >> Fred > > > > >>> I found this blog post from 2006 (http://www.caboo.se/articles/ > > > >>> 2006/2/20/assert-yourself-man-redirecting-with-rjs) and I was > > > >>> wondering if there''s a better/different way of achieving the same > > > > >>> Thanks in advance, > > > > >>> Mauro--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---