diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-10-10 21:07:53 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-10-10 21:13:12 -0200 |
commit | cb26eee54d34eda966b4c9da810b700cce24f824 (patch) | |
tree | 4da68eec8328b8b00c4a5f144f71ab509065a973 /actionpack/test/template | |
parent | cc8e386d08d83ca1ad0c5da863f588b4c4fbe62c (diff) | |
download | rails-cb26eee54d34eda966b4c9da810b700cce24f824.tar.gz rails-cb26eee54d34eda966b4c9da810b700cce24f824.tar.bz2 rails-cb26eee54d34eda966b4c9da810b700cce24f824.zip |
Revert "Make InstanceTagMethods#value_before_type_cast raise if the model don't respond to attr_before_type_cast or attr method"
And "Makes form_helper use overriden model accessors"
This reverts commit 3ba8e3100548f10fce0c9784981a4589531476dd and fb0bd8c1092db51888ec4bb72af6c595e13c31fa.
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/form_helper_test.rb | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index 8809e510fb..0bfdbeebd1 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -4,18 +4,6 @@ require 'controller/fake_models' class FormHelperTest < ActionView::TestCase tests ActionView::Helpers::FormHelper - class Developer - def name_before_type_cast - "David" - end - - def name - "Santiago" - end - - attr_writer :language - end - def form_for(*) @output_buffer = super end @@ -278,24 +266,6 @@ class FormHelperTest < ActionView::TestCase text_field("user", "email", :type => "email") end - def test_text_field_from_a_user_defined_method - @developer = Developer.new - assert_dom_equal( - '<input id="developer_name" name="developer[name]" size="30" type="text" value="Santiago" />', text_field("developer", "name") - ) - end - - def test_text_field_on_a_model_with_undefined_attr_reader - @developer = Developer.new - @developer.language = 'ruby' - begin - text_field("developer", "language") - rescue NoMethodError => error - message = error.message - end - assert_equal "Model #{Developer} does not respond to language", message - end - def test_check_box assert_dom_equal( '<input name="post[secret]" type="hidden" value="0" /><input checked="checked" id="post_secret" name="post[secret]" type="checkbox" value="1" />', |