aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/prototype_helper_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-07-15 18:42:22 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2008-07-15 18:42:22 -0700
commitecc054352512cac8c0895c78c5f3d043046dcfec (patch)
treef912cb8d90909eb829a7f7aec9f0d021bcad2790 /actionpack/test/template/prototype_helper_test.rb
parentfbef982e4b906b879240a35a1ecff447007da6b2 (diff)
downloadrails-ecc054352512cac8c0895c78c5f3d043046dcfec.tar.gz
rails-ecc054352512cac8c0895c78c5f3d043046dcfec.tar.bz2
rails-ecc054352512cac8c0895c78c5f3d043046dcfec.zip
JavaScriptGenerator should only sets output_buffer for the duration of the update block
Diffstat (limited to 'actionpack/test/template/prototype_helper_test.rb')
-rw-r--r--actionpack/test/template/prototype_helper_test.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/test/template/prototype_helper_test.rb b/actionpack/test/template/prototype_helper_test.rb
index 5528430d80..92cc85703b 100644
--- a/actionpack/test/template/prototype_helper_test.rb
+++ b/actionpack/test/template/prototype_helper_test.rb
@@ -28,7 +28,7 @@ class PrototypeHelperBaseTest < ActionView::TestCase
attr_accessor :template_format, :output_buffer
def setup
- @template = nil
+ @template = self
@controller = Class.new do
def url_for(options)
if options.is_a?(String)
@@ -243,8 +243,12 @@ class PrototypeHelperTest < PrototypeHelperBaseTest
end
def test_update_page
+ old_output_buffer = output_buffer
+
block = Proc.new { |page| page.replace_html('foo', 'bar') }
assert_equal create_generator(&block).to_s, update_page(&block)
+
+ assert_equal old_output_buffer, output_buffer
end
def test_update_page_tag