Hai Guys.. I need help.. I want to run test:unit in controller and the result will show on view..... Any body can help me??? -- Wu You Duan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
anton effendi wrote:> I want to run test:unit in controller and the result will show on > view..... Any body can help me???> Wu You Duan(BTW which one are you?) You can run a script from the view like this: <pre><%=h `rake test:units` %></pre> However, why would you do such a thing? Unit tests should run while you edit, before you manually test in development mode, and way before production mode. -- Phlip --~--~---------~--~----~------------~-------~--~----~ 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 want to make monitoring 1 site... I don''t have idea about it.. so I think that is idea for solve... do you have idea??? On Sun, Jan 11, 2009 at 11:55 PM, Phlip <phlip2005-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > anton effendi wrote: > > > I want to run test:unit in controller and the result will show on > > view..... Any body can help me??? > > > Wu You Duan > > (BTW which one are you?) > > You can run a script from the view like this: > > <pre><%=h `rake test:units` %></pre> > > However, why would you do such a thing? Unit tests should run while you > edit, > before you manually test in development mode, and way before production > mode. > > -- > Phlip > > > > >-- Wu You Duan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Here''s a reason for running tests from a controller: Testing the implementation of a 3rd party API. I have a Rails app that sends RESTful requests to a third party who is implementing the interface. The third party may or may not be using Rails. I want to allow the third party to run our test suite and have access to the test results so that they can verify their implementation. I haven''t implemented the interface yet, but this is a step in the right direction for me. Brian On Jan 11, 8:55 am, Phlip <phlip2...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> anton effendi wrote: > > I want to run test:unit in controller and the result will show on > > view..... Any body can help me??? > > Wu You Duan > > (BTW which one are you?) > > You can run a script from the view like this: > > <pre><%=h `rake test:units` %></pre> > > However, why would you do such a thing? Unit tests should run while you edit, > before you manually test in development mode, and way before production mode. > > -- > Phlip--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---