From d270da569efeabd7cd563028816452236713aa9f Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Mon, 5 Apr 2010 18:41:35 -0300 Subject: changed from :object_name to :as on form_for api --- actionpack/test/template/erb/form_for_test.rb | 2 +- actionpack/test/template/form_helper_test.rb | 18 +++++++----------- 2 files changed, 8 insertions(+), 12 deletions(-) (limited to 'actionpack/test/template') diff --git a/actionpack/test/template/erb/form_for_test.rb b/actionpack/test/template/erb/form_for_test.rb index 482dbb0287..ec6e872735 100644 --- a/actionpack/test/template/erb/form_for_test.rb +++ b/actionpack/test/template/erb/form_for_test.rb @@ -8,4 +8,4 @@ module ERBTest assert_equal "
", output end end -end \ No newline at end of file +end diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index f6401985cc..88014a6564 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -440,7 +440,7 @@ class FormHelperTest < ActionView::TestCase end def test_form_for_with_symbol_object_name - form_for(@post, :object_name => "other_name", :html => { :id => 'create-post' }) do |f| + form_for(@post, :as => "other_name", :html => { :id => 'create-post' }) do |f| concat f.label(:title) concat f.text_field(:title) concat f.text_area(:body) @@ -504,12 +504,10 @@ class FormHelperTest < ActionView::TestCase end def test_form_for_without_object - assert_deprecated do - form_for(:post, :html => { :id => 'create-post' }) do |f| - concat f.text_field(:title) - concat f.text_area(:body) - concat f.check_box(:secret) - end + form_for(:post, :html => { :id => 'create-post' }) do |f| + concat f.text_field(:title) + concat f.text_area(:body) + concat f.check_box(:secret) end expected = @@ -603,10 +601,8 @@ class FormHelperTest < ActionView::TestCase def test_submit_without_object_and_locale_strings old_locale, I18n.locale = I18n.locale, :submit - assert_deprecated do - form_for(:post) do |f| - concat f.submit :class => "extra" - end + form_for(:post) do |f| + concat f.submit :class => "extra" end expected = "
" + -- cgit v1.2.3