aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/assert_select_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/assert_select_test.rb')
-rw-r--r--actionpack/test/controller/assert_select_test.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/actionpack/test/controller/assert_select_test.rb b/actionpack/test/controller/assert_select_test.rb
index d3359e79a6..38598a520c 100644
--- a/actionpack/test/controller/assert_select_test.rb
+++ b/actionpack/test/controller/assert_select_test.rb
@@ -10,6 +10,16 @@ require 'controller/fake_controllers'
require 'action_mailer'
ActionMailer::Base.view_paths = FIXTURE_LOAD_PATH
+class SynchronousQueue < Queue
+ def push(job)
+ job.run
+ end
+ alias << push
+ alias enq push
+end
+
+ActionMailer::Base.queue = SynchronousQueue.new
+
class AssertSelectTest < ActionController::TestCase
Assertion = ActiveSupport::TestCase::Assertion
@@ -131,6 +141,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 }