From 838ec413ebe08be71eea3dec0b061c6f609c839f Mon Sep 17 00:00:00 2001 From: Sam Stephenson Date: Sun, 12 Feb 2006 01:30:13 +0000 Subject: Add JavaScriptGenerator#replace_element for replacing an element's "outer HTML". Closes #3246. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3579 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/template/prototype_helper_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actionpack/test/template/prototype_helper_test.rb') diff --git a/actionpack/test/template/prototype_helper_test.rb b/actionpack/test/template/prototype_helper_test.rb index eef6841727..fc4ebeccc3 100644 --- a/actionpack/test/template/prototype_helper_test.rb +++ b/actionpack/test/template/prototype_helper_test.rb @@ -171,6 +171,11 @@ class JavaScriptGeneratorTest < Test::Unit::TestCase @generator.replace_html('element', '

This is a test

') end + def test_replace_element_with_string + assert_equal 'Element.replace("element", "

This is a test

");', + @generator.replace_element('element', '

This is a test

') + end + def test_remove assert_equal '["foo"].each(Element.remove);', @generator.remove('foo') -- cgit v1.2.3