diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2012-03-30 11:39:18 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-03-30 11:40:23 -0300 |
commit | 1141f71601ff61fb299c86d814c07209f1430024 (patch) | |
tree | ece1af5b7871e68c318e05f679aeb343802352bb /actionpack/test | |
parent | 1ce75450a9fba33edf2bffee0bf0ac3d31ea677f (diff) | |
download | rails-1141f71601ff61fb299c86d814c07209f1430024.tar.gz rails-1141f71601ff61fb299c86d814c07209f1430024.tar.bz2 rails-1141f71601ff61fb299c86d814c07209f1430024.zip |
Remove the leading \n added by textarea on assert_select
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/assert_select_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/controller/assert_select_test.rb b/actionpack/test/controller/assert_select_test.rb index d3359e79a6..3d667f0a2f 100644 --- a/actionpack/test/controller/assert_select_test.rb +++ b/actionpack/test/controller/assert_select_test.rb @@ -131,6 +131,13 @@ class AssertSelectTest < ActionController::TestCase assert_raise(Assertion) { assert_select "pre", :html=>text } end + def test_strip_textarea + render_html %Q{<textarea>\n\nfoo\n</textarea>} + assert_select "textarea", "\nfoo\n" + render_html %Q{<textarea>\nfoo</textarea>} + assert_select "textarea", "foo" + end + def test_counts render_html %Q{<div id="1">foo</div><div id="2">foo</div>} assert_nothing_raised { assert_select "div", 2 } |