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:45:12 -0300 |
commit | 5c7bb86a1bafbc6f067452768f37e566d6020918 (patch) | |
tree | d00ebf66ebc5e53e47d3265ed2ccb62e42912aa6 /actionpack/test/controller/assert_select_test.rb | |
parent | 5284e650be321273a2bb68bf4baa8adeb6bc586b (diff) | |
download | rails-5c7bb86a1bafbc6f067452768f37e566d6020918.tar.gz rails-5c7bb86a1bafbc6f067452768f37e566d6020918.tar.bz2 rails-5c7bb86a1bafbc6f067452768f37e566d6020918.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 } |