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.
Methods
Class Public methods
new(hash = {})
π Source code
# File actionview/lib/action_view/testing/resolvers.rb, line 11
def initialize(hash = {})
super("")
@hash = hash
@path = ""
end
π See on GitHub
Instance Public methods
data()
π Source code
# File actionview/lib/action_view/testing/resolvers.rb, line 17
def data
@hash
end
π See on GitHub
to_s()
π Source code
# File actionview/lib/action_view/testing/resolvers.rb, line 21
def to_s
@hash.keys.join(", ")
end
π See on GitHub