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 <[email protected]> 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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to