PageRenderTime 24ms CodeModel.GetById 18ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/scalate-core/src/test/scala/org/fusesource/scalate/filter/CoffeeScriptPipelineTest.scala

http://github.com/scalate/scalate
Scala | 22 lines | 17 code | 5 blank | 0 comment | 0 complexity | ae8f84861d078b017fbec4117890c909 MD5 | raw file
 1package org.fusesource.scalate.filter
 2
 3import org.fusesource.scalate.TemplateTestSupport
 4import org.fusesource.scalate.util.ResourceLoader
 5import org.fusesource.scalate.support.TemplateFinder
 6
 7class CoffeeScriptPipelineTest extends TemplateTestSupport {
 8
 9  lazy val finder = new TemplateFinder(engine)
10
11  test("coffeescript pipeline") {
12    assertUriOutputContains(
13      "/org/fusesource/scalate/filter/sample.js",
14      """alert("Hello, Coffee!");
15""")
16  }
17
18  override protected def fromUri(uri: String) = {
19    val newUri = finder.findTemplate(uri).getOrElse(uri)
20    super.fromUri(newUri)
21  }
22}