aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-04-05 18:41:35 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2010-04-05 18:55:37 -0300
commitd270da569efeabd7cd563028816452236713aa9f (patch)
tree42a24776b809d939c06cef3b02d5851e99a7fb54 /actionpack/test
parent1f7b4447a9030ccec542ecaa1e5e11e0d4622a84 (diff)
downloadrails-d270da569efeabd7cd563028816452236713aa9f.tar.gz
rails-d270da569efeabd7cd563028816452236713aa9f.tar.bz2
rails-d270da569efeabd7cd563028816452236713aa9f.zip
changed from :object_name to :as on form_for api
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/erb/form_for_test.rb2
-rw-r--r--actionpack/test/template/form_helper_test.rb18
2 files changed, 8 insertions, 12 deletions
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 "<form action=\"/blah/update\" method=\"post\"></form>", 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 = "<form action='http://www.example.com' method='post'>" +