GRAILS-1019: Allowing expressions to be used with the 'disabled' attribute for g...
[grails.git] / test / groovy / org / codehaus / groovy / grails / cli / InstallTemplatesTests.groovy
blob11032de2bb41d306ee83b604a627827880227d2c
1 package org.codehaus.groovy.grails.cli;
3 class InstallTemplatesTests extends AbstractCliTests {
6 void testInstallTemplatesCreatesTemplates() {
7 gantRun( ["-f", "scripts/CreateApp.groovy"] as String[])
9 def appDir = appBase + File.separatorChar + System.getProperty("grails.cli.args")
10 System.setProperty("base.dir", appDir)
11 def templatesDirectory = "${appDir}/src/templates/"
13 assertFalse "${templatesDirectory} exists, but should not", new File(templatesDirectory).exists()
15 gantRun( ["-f", "scripts/InstallTemplates.groovy"] as String[])
17 assertTrue "${templatesDirectory} does not exist", new File(templatesDirectory).exists()
19 // expected templates to be installed
20 def templates = [
21 "/artifacts/Controller.groovy",
22 "/artifacts/DomainClass.groovy",
23 "/artifacts/Service.groovy",
24 "/artifacts/TagLib.groovy",
25 "/artifacts/Tests.groovy",
26 "/artifacts/WebTest.groovy",
27 "/scaffolding/Controller.groovy",
28 "/scaffolding/create.gsp",
29 "/scaffolding/edit.gsp",
30 "/scaffolding/list.gsp",
31 "/scaffolding/show.gsp",
32 "/scaffolding/renderEditor.template"
35 for (t in templates) {
36 assertTrue "${templatesDirectory}${t} does not exist", new File(templatesDirectory + t).exists()