Class: ActionView::FixtureResolver
- Inherits:
-
OptimizedFileSystemResolver
- Object
- Resolver
- PathResolver
- FileSystemResolver
- OptimizedFileSystemResolver
- ActionView::FixtureResolver
- Defined in:
- actionview/lib/action_view/testing/resolvers.rb
Overview
Use FixtureResolver in your tests to simulate the presence of files on the file system. This is used internally by Rails’ own test suite, and is useful for testing extensions that have no way of knowing what the file system will look like at runtime.
Constant Summary
Constants inherited from PathResolver
PathResolver::DEFAULT_PATTERN, PathResolver::EXTENSIONS
Instance Attribute Summary
Attributes inherited from FileSystemResolver
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(hash = {}, pattern = nil) ⇒ FixtureResolver
constructor
A new instance of FixtureResolver.
- #to_s ⇒ Object
Methods inherited from FileSystemResolver
Methods inherited from PathResolver
Methods inherited from Resolver
#clear_cache, #find_all, #find_all_with_query
Constructor Details
#initialize(hash = {}, pattern = nil) ⇒ FixtureResolver
Returns a new instance of FixtureResolver.
11 12 13 14 15 16 17 18 19 |
# File 'actionview/lib/action_view/testing/resolvers.rb', line 11 def initialize(hash = {}, pattern = nil) super("") if pattern ActiveSupport::Deprecation.warn "Specifying a custom path for #{self.class} is deprecated. Implement a custom Resolver subclass instead." @pattern = pattern end @hash = hash @path = "" end |