1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

added :prefixes accessor to LookupContext.

This commit is contained in:
Nick Sutterer 2011-05-03 23:38:44 +02:00
parent bff374050d
commit 37f448e05e
2 changed files with 8 additions and 0 deletions

View file

@ -9,6 +9,8 @@ module ActionView
# generate a key, given to view paths, used in the resolver cache lookup. Since
# this key is generated just once during the request, it speeds up all cache accesses.
class LookupContext #:nodoc:
attr_accessor :prefixes
mattr_accessor :fallbacks
@@fallbacks = FallbackFileSystemResolver.instances

View file

@ -180,6 +180,12 @@ class LookupContextTest < ActiveSupport::TestCase
assert_not_equal template, old_template
end
test "responds to #prefixes" do
assert_equal nil, @lookup_context.prefixes
@lookup_context.prefixes = ["foo"]
assert_equal ["foo"], @lookup_context.prefixes
end
end
class LookupContextWithFalseCaching < ActiveSupport::TestCase