What steps will reproduce the problem? If possible, provide source code and
stack trace.
Code
class EncryptionServiceSpec extends Specification {
def "test decryption of unecnrypted file"(){
setup:
def clearTextFile = new File("test/resources/clearText.txt")
clearTextFile.write("THIS IS CLEAR TEXT")
when:
def (privateKey,publicCert) = service.generateKeyPair("123")
service.decryptFile(new FileInputStream(clearTextFile), privateKey )
then:
clearTextFile.delete()
thrown GeneralSecurityException
}
}
2.
java.lang.ClassCastException:
org.codehaus.groovy.ast.expr.ArgumentListExpression cannot be cast to
org.codehaus.groovy.ast.expr.VariableExpression at
org.codehaus.groovy.ast.expr.DeclarationExpression.getVariableExpression(Declara
tionExpression.java:103) at
org.spockframework.compiler.SpecRewriter.moveVariableDeclarations(SpecRewriter.j
ava:538)
3.
When I remove the multi assignment def (privateKey,publicCert) and use a list
it works fine
What version of Spock and Groovy are you using?
Groovy 1.8 Spock 0.7
Please provide any additional information below. You can also assign
labels.
Original issue reported on code.google.com by nocon...@genospace.com on 7 Feb 2013 at 2:34
Original issue reported on code.google.com by
nocon...@genospace.com
on 7 Feb 2013 at 2:34