aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-12-14 09:23:34 +0100
committerJosé Valim <jose.valim@gmail.com>2011-12-14 09:23:34 +0100
commitf3531a8fc9f661f96759f0a851540745876e5d6c (patch)
tree8ef0075a073746482229bcabdb6727e18268861d /actionpack/test
parent38703ac8972c7e8f3f3f1ac95aa506cc4ae30ef0 (diff)
downloadrails-f3531a8fc9f661f96759f0a851540745876e5d6c.tar.gz
rails-f3531a8fc9f661f96759f0a851540745876e5d6c.tar.bz2
rails-f3531a8fc9f661f96759f0a851540745876e5d6c.zip
Clean up details keys before some tests to expire the cache.
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/compiled_templates_test.rb4
-rw-r--r--actionpack/test/template/lookup_context_test.rb8
2 files changed, 5 insertions, 7 deletions
diff --git a/actionpack/test/template/compiled_templates_test.rb b/actionpack/test/template/compiled_templates_test.rb
index 8fc78283d8..30d798d693 100644
--- a/actionpack/test/template/compiled_templates_test.rb
+++ b/actionpack/test/template/compiled_templates_test.rb
@@ -3,6 +3,10 @@ require 'controller/fake_models'
class CompiledTemplatesTest < Test::Unit::TestCase
def setup
+ # Clean up any details key cached to expose failures
+ # that otherwise would appear just on isolated tests
+ ActionView::LookupContext::DetailsKey.clear
+
@compiled_templates = ActionView::CompiledTemplates
@compiled_templates.instance_methods.each do |m|
@compiled_templates.send(:remove_method, m) if m =~ /^_render_template_/
diff --git a/actionpack/test/template/lookup_context_test.rb b/actionpack/test/template/lookup_context_test.rb
index bac2530e3d..c65f707da0 100644
--- a/actionpack/test/template/lookup_context_test.rb
+++ b/actionpack/test/template/lookup_context_test.rb
@@ -1,20 +1,14 @@
require "abstract_unit"
require "abstract_controller/rendering"
-ActionView::LookupContext::DetailsKey.class_eval do
- def self.details_keys
- @details_keys
- end
-end
-
class LookupContextTest < ActiveSupport::TestCase
def setup
@lookup_context = ActionView::LookupContext.new(FIXTURE_LOAD_PATH, {})
+ ActionView::LookupContext::DetailsKey.clear
end
def teardown
I18n.locale = :en
- ActionView::LookupContext::DetailsKey.details_keys.clear
end
test "process view paths on initialization" do