Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work with templates in any directory. #69

Merged
merged 1 commit into from
Apr 4, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,13 @@ class TemplateCompilationUnitTest {

assertTrue("Creating a `TemplateCompilationUnit` should force the underlying project to automatically add the Scala nature.", project.hasScalaNature)
}


@Test
def views_in_non_standard_folder_work() {
val tFile = file("moreviews/more.scala.html")
val tu = TemplateCompilationUnit(tFile)
assertTrue(s"No errors expected ${tu.currentProblems.map(_.getMessage())}", tu.generatedSource.isSuccess)
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@(message: String)

<html><body>@message</body></html>
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class PlayProject private (val scalaProject: ScalaProject) {
*
* @return the absolute location of the `/app/views` directory, below the project root
*/
lazy val sourceDir = new File(scalaProject.underlying.getLocation().toString() + "/app/views")
lazy val sourceDir = scalaProject.underlying.getLocation().toFile()
}

object PlayProject {
Expand Down