From 13fe1903d89fa9345a9f0b17de2d31e8b7ef2b1d Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Fri, 30 Mar 2012 11:39:18 -0300 Subject: Remove the leading \n added by textarea on assert_select --- actionpack/test/controller/assert_select_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'actionpack/test') 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{} + assert_select "textarea", "\nfoo\n" + render_html %Q{} + assert_select "textarea", "foo" + end + def test_counts render_html %Q{
foo
foo
} assert_nothing_raised { assert_select "div", 2 } -- cgit v1.2.3