Re: Limiting test assertion methods in Core

Marcel Molina Jr.
Fri, 13 Jul 2007 03:52:51 -0000

On Thu, Jul 12, 2007 at 07:57:01PM -0700, Josh Peek
wrote:
> There used to be a ton of test assertion helpers in Core like
> assert_session, assert_cookie, assert_flash, etc. See
>
http://dev.rubyonrails.org/browser/trunk/actionpack/lib/action_controller/assertions/deprecated_assertions.rb?rev=4935
> for some history. I wasn''t around for the extract reason they were
> removed, but we don''t need a helper method for every possible
> situation in Rails. And assert @response.flash[:notice] isn''t that
> bad.

They were pulled out because the API was bloated. Providing access to
sessions and flash and cookies in functional tests removed the need for
almost 30 assertions.

marcel
--
Marcel Molina Jr. <marcel@vernix.org>