123456789_123456789_123456789_123456789_123456789_

Class: ActionView::FixtureResolver

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Resolver
Instance Chain:
self, Resolver
Inherits: ActionView::PathResolver
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.

Class Attribute Summary

Resolver - Inherited

Class Method Summary

Instance Attribute Summary

Resolver - Inherited

Instance Method Summary

Resolver - Inherited

#caching?, #clear_cache,
#find_all

Normalizes the arguments and passes it on to find_templates.

#find_all_anywhere

Constructor Details

.new(hash = {}, pattern = nil) ⇒ FixtureResolver

[ GitHub ]

  
# File 'actionview/lib/action_view/testing/resolvers.rb', line 13

def initialize(hash = {}, pattern = nil)
  super(pattern)
  @hash = hash
end

Instance Attribute Details

#hash (readonly)

[ GitHub ]

  
# File 'actionview/lib/action_view/testing/resolvers.rb', line 11

attr_reader :hash

Instance Method Details

#to_s

[ GitHub ]

  
# File 'actionview/lib/action_view/testing/resolvers.rb', line 18

def to_s
  @hash.keys.join(", ")
end