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. I noticed 2 new patches that fall under this category today. http://dev.rubyonrails.org/ticket/8971 http://dev.rubyonrails.org/ticket/8973 Any of these kinds of helpers should be plugin territory. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
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> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
If the goal is to keep the API streamlined, #8793 (assert_charset)
probably isn''t a big enough win to bother with. But #8791
(assert_content_type) does allow you to do this:
assert_content_type :js
instead of this:
assert_equal Mime::Type.lookup_by_extension(''js'').to_s,
@response.content_type
On Jul 12, 10:52 pm, "Marcel Molina Jr." <mar...@vernix.org>
wrote:> 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_contro...
> > 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. <mar...@vernix.org>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-core-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---