aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-03-14 17:28:31 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-03-14 17:32:32 -0300
commitd17b87919fae5850051bf7a173d3c6a84778f941 (patch)
tree992b91adc70ea251fda06909c242eded0d57c261 /actionview/test
parent274d5e45e00f6bddab8fecceccad3ba6c1c66232 (diff)
downloadrails-d17b87919fae5850051bf7a173d3c6a84778f941.tar.gz
rails-d17b87919fae5850051bf7a173d3c6a84778f941.tar.bz2
rails-d17b87919fae5850051bf7a173d3c6a84778f941.zip
Fix the resolver cache and stop mutating the lookup_context
Before we had a bug in the resolver cache so the disable_cache were not working when passing options to find
Diffstat (limited to 'actionview/test')
-rw-r--r--actionview/test/template/digestor_test.rb8
-rw-r--r--actionview/test/template/lookup_context_test.rb13
2 files changed, 0 insertions, 21 deletions
diff --git a/actionview/test/template/digestor_test.rb b/actionview/test/template/digestor_test.rb
index 72d1f43f12..1c47952f54 100644
--- a/actionview/test/template/digestor_test.rb
+++ b/actionview/test/template/digestor_test.rb
@@ -40,14 +40,6 @@ class FixtureFinder
def disable_cache(&block)
yield
end
-
- def with_formats_and_variants(new_formats, new_variants)
- old_formats, old_variants = formats, variants
- self.formats, self.variants = new_formats, new_variants
- yield
- ensure
- self.formats, self.variants = old_formats, old_variants
- end
end
class TemplateDigestorTest < ActionView::TestCase
diff --git a/actionview/test/template/lookup_context_test.rb b/actionview/test/template/lookup_context_test.rb
index b11f252110..4f7823045e 100644
--- a/actionview/test/template/lookup_context_test.rb
+++ b/actionview/test/template/lookup_context_test.rb
@@ -205,19 +205,6 @@ class LookupContextTest < ActiveSupport::TestCase
@lookup_context.prefixes = ["foo"]
assert_equal ["foo"], @lookup_context.prefixes
end
-
- test "with_formats_and_variants preserves original values after execution" do
- @lookup_context.formats = [:html]
- @lookup_context.variants = [:phone]
-
- @lookup_context.with_formats_and_variants([:xml], [:tablet]) do
- assert_equal [:xml], @lookup_context.formats
- assert_equal [:tablet], @lookup_context.variants
- end
-
- assert_equal [:html], @lookup_context.formats
- assert_equal [:phone], @lookup_context.variants
- end
end
class LookupContextWithFalseCaching < ActiveSupport::TestCase