Hi all,

I'd like to gauge the interest for a patch before I add to the already large ticket list in Trac.

I've created a small patch that cleans up functional tests. With this patch applied, functional tests can look just like unit tests. There is no need to open the controller class in order to define a rescue method and there is no need to create the @controller, @request, and @response variables. These are done at runtime, based on the name of the test class. In addition, accessors methods are defined for controller, request, and response.

This patch maintains backward compatibility with the current functional test structure, and includes tests for the new functionality.

If there is interest in moving this into core, I would be happy to patch the functional test generator to remove the cruft.

I've made this new behavior available via the TestInjector plugin, which you can view/install from http://www.infused.org/svn/plugins/test_injector, in case you'd like to test out the behavior in your applications. Once you install TestInjector you will automatically get the benefits of the above patch. All of the other functionality of TestInjector has to be explicitly enabled by you.

Comments, questions, suggestions?

Cheers,
Keith Morrison


_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to