123456789_123456789_123456789_123456789_123456789_

Class: ActionView::FixtureResolver

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

FileSystemResolver - Inherited

Resolver - Inherited

Instance Method Summary

FileSystemResolver - Inherited

Resolver - Inherited

#caching?, #clear_cache,
#find_all

Normalizes the arguments and passes it on to find_templates.

Constructor Details

.new(hash = {}) ⇒ FixtureResolver

[ GitHub ]

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

def initialize(hash = {})
  super("")
  @hash = hash
  @path = ""
end

Instance Method Details

#data

[ GitHub ]

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

def data
  @hash
end

#to_s

[ GitHub ]

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

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