aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/caching_test.rb
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2011-05-22 23:14:52 -0700
committerwycats <wycats@gmail.com>2011-05-22 23:14:52 -0700
commit7b9f3eb10bc558ceb9942da2ee3daffe5c068316 (patch)
tree1351ef25742c794b4478da92a3bed564411554c8 /actionpack/test/controller/caching_test.rb
parentddc584e89eaf6845f8cd72bcafce5035c9893dbb (diff)
downloadrails-7b9f3eb10bc558ceb9942da2ee3daffe5c068316.tar.gz
rails-7b9f3eb10bc558ceb9942da2ee3daffe5c068316.tar.bz2
rails-7b9f3eb10bc558ceb9942da2ee3daffe5c068316.zip
Always initialize @title in caching test to avoid uninitialized instance variable warning
Diffstat (limited to 'actionpack/test/controller/caching_test.rb')
-rw-r--r--actionpack/test/controller/caching_test.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb
index fada0c7748..82c2c23607 100644
--- a/actionpack/test/controller/caching_test.rb
+++ b/actionpack/test/controller/caching_test.rb
@@ -187,6 +187,9 @@ class ActionCachingTestController < CachingController
rescue_from(ActiveRecord::RecordNotFound) { head :not_found }
end
+ # Eliminate uninitialized ivar warning
+ before_filter { @title = nil }
+
caches_action :index, :redirected, :forbidden, :if => Proc.new { |c| !c.request.format.json? }, :expires_in => 1.hour
caches_action :show, :cache_path => 'http://test.host/custom/show'
caches_action :edit, :cache_path => Proc.new { |c| c.params[:id] ? "http://test.host/#{c.params[:id]};edit" : "http://test.host/edit" }