[Nitro] testable controllers
Aidan Rogers
aidan at yoyo.org
Tue Sep 18 14:11:19 EDT 2007
+1 from me.
Aidan
On Sep 18, 2007, at 3:39 PM, Dan North wrote:
> Hi George.
>
> This is a plea from the heart to revert the controller (dispatcher
> method) behaviour to returning a string rather than using multiple
> print
> statements.
>
> I can test the former simply just by constructing a controller
> class and
> looking at the result of a method call. The latter requires me to
> subvert the global $stdout, which is just evil in a testing context.
>
> As a developer, if I want to assemble the string in chunks I can do
> that
> during the method and then return the result at the end, which
> provides
> the same facility as multiple prints would.
>
> Thanks,
> Dan
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
More information about the Nitro-general
mailing list