forked from grails/grails-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only unit tests are now created with GrailsUnitTestMixin. Also, the s…
…ample test method now has a fail() in it, so running the default tests will result in test failures. We should probably add configuration and command line options for disabling this automatic creation of tests.
- Loading branch information
Showing
3 changed files
with
30 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
grails-resources/src/grails/grails-home/src/grails/templates/testing/UnitTest.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@artifact.package@import static org.junit.Assert.* | ||
|
||
import grails.test.mixin.* | ||
import grails.test.mixin.support.* | ||
import org.junit.* | ||
|
||
/** | ||
* See the API for {@link grails.test.mixin.support.GrailsUnitTestMixin} for usage instructions | ||
*/ | ||
@TestMixin(GrailsUnitTestMixin) | ||
class @artifact.name@ { | ||
|
||
@Before | ||
void setUp() { | ||
// Setup logic here | ||
} | ||
|
||
@After | ||
void tearDown() { | ||
// Tear down logic here | ||
} | ||
|
||
@Test | ||
void testSomething() { | ||
fail "Implement me" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters