Option to specify custom pattern for template filenames

This commit is contained in:
Andrei Gladkyi
2013-11-30 17:55:53 +02:00
parent 5ce36f79e9
commit 0edb252489
2 changed files with 19 additions and 3 deletions
+5
View File
@@ -25,5 +25,10 @@ class FileSystemTest < Test::Unit::TestCase
assert_raise(FileSystemError) do
file_system.full_path("/etc/passwd")
end
# custom pattern for template filenames
file_system = Liquid::LocalFileSystem.new("/some/path", "%s.html")
assert_equal "/some/path/mypartial.html" , file_system.full_path("mypartial")
assert_equal "/some/path/dir/mypartial.html", file_system.full_path("dir/mypartial")
end
end # FileSystemTest