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:44:15 -0300 |
commit | 13fe1903d89fa9345a9f0b17de2d31e8b7ef2b1d (patch) | |
tree | f12ddeed846cc2c755d197db2c1cc8022a97065e /actionpack/test/controller/assert_select_test.rb | |
parent | 1d753ab6c8bb8d4fb25ddb48d3859fd371bedae6 (diff) | |
download | rails-13fe1903d89fa9345a9f0b17de2d31e8b7ef2b1d.tar.gz rails-13fe1903d89fa9345a9f0b17de2d31e8b7ef2b1d.tar.bz2 rails-13fe1903d89fa9345a9f0b17de2d31e8b7ef2b1d.zip |
Remove the leading \n added by textarea on assert_select
Diffstat (limited to 'actionpack/test/controller/assert_select_test.rb')
-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 5eef8a32d7..97200cb6db 100644 --- a/actionpack/test/controller/assert_select_test.rb +++ b/actionpack/test/controller/assert_select_test.rb @@ -135,6 +135,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 } |