aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/test_case.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-06-08 20:05:39 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2008-06-08 20:05:39 -0700
commitff5f155f8dc1d2ba363718c3e17f99719399eab5 (patch)
tree6d6e353284cc9c630697ae92f710df499d2f8197 /actionpack/lib/action_view/test_case.rb
parentd9fb021845c0481c5119eebdc534aec427072f7d (diff)
downloadrails-ff5f155f8dc1d2ba363718c3e17f99719399eab5.tar.gz
rails-ff5f155f8dc1d2ba363718c3e17f99719399eab5.tar.bz2
rails-ff5f155f8dc1d2ba363718c3e17f99719399eab5.zip
Use output_buffer reader and writer methods exclusively instead of hitting the instance variable so others can override the methods.
Diffstat (limited to 'actionpack/lib/action_view/test_case.rb')
-rw-r--r--actionpack/lib/action_view/test_case.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/test_case.rb b/actionpack/lib/action_view/test_case.rb
index 16fedd9732..1a3c93c283 100644
--- a/actionpack/lib/action_view/test_case.rb
+++ b/actionpack/lib/action_view/test_case.rb
@@ -37,6 +37,8 @@ module ActionView
if helper_class && !self.class.ancestors.include?(helper_class)
self.class.send(:include, helper_class)
end
+
+ self.output_buffer = ''
end
class TestController < ActionController::Base
@@ -48,6 +50,9 @@ module ActionView
end
end
+ protected
+ attr_accessor :output_buffer
+
private
def method_missing(selector, *args)
controller = TestController.new