Skip to content

Instantly share code, notes, and snippets.

@MartinAhrer
Last active January 3, 2016 23:39
Show Gist options
  • Save MartinAhrer/8536263 to your computer and use it in GitHub Desktop.
Save MartinAhrer/8536263 to your computer and use it in GitHub Desktop.
Groovy compilation error with Gradle source set
// reference to ComponentTestConfiguration results in a compilation error
// whereas reference to IshouldBeCompiled is fine
@ContextConfiguration(classes = [ComponentTestConfiguration.class])
class UserAccountRepositorySaveSpec extends Specification {
@Autowired
UserAccountRepository repository
def saveReturnsInstance() {
given:
def userName = randomAlphanumeric(new IshouldBeCompiled().configurationValue())
def password = randomAlphanumeric(6)
def userAccount = new UserAccount(userName, password)
when:
def savedUserAccount = repository.save(userAccount)
then:
savedUserAccount != null
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment