Grails 2.0.0 and spock:0.6-SNAPSHOT Feature methods cannot be called from user code error

16 views
Skip to first unread message

Jacqui Snook

unread,
Dec 21, 2011, 9:14:37 AM12/21/11
to Spock Framework - User
Hi,

I am trying to use Spock with Grails 2.0.0 but I get the following
exception with every test that is run even the most simple ones:

Feature methods cannot be called from user code

org.spockframework.runtime.InvalidSpecException: Feature methods
cannot be called from user code
at
org.spockframework.runtime.SpockRuntime.featureMethodCalled(SpockRuntime.java:
80)

This is an example of a really simple test which throws this
exception:

class BasicTests extends Specification {

def "test broken"() {
when:
def result = 2 + 2
then:
4 == result
}
}

btw., It makes no difference if I add the @TestFor annotations or not.

Anyone have any idea why this is not running?

Many thanks in advance.

Luke Daley

unread,
Jan 3, 2012, 7:35:15 AM1/3/12
to spockfr...@googlegroups.com

No idea sorry, any chance you could share a reproducible sample?

Reply all
Reply to author
Forward
0 new messages