Results 1 to 3 of 3

Thread: Spock support in STS

  1. #1
    Join Date
    Jan 2011
    Posts
    1

    Default Spock support in STS

    I'm using STS 2.5.2 and spock 0.5-1.7.
    I have a very simple Maven and Groovy project on github:
    https://github.com/claymccoy/SpockInSts

    I followed the steps here:
    http://mrhaki.blogspot.com/2011/01/s...t-to-java.html

    First, these manual steps should not be necessary, but pehaps that is a problem with m2eclipse.

    Regardless, it doens't work. I can't run the Spock test because there is no option for it under "Run As".

    Are other people getting this to work? If so what do I need to do?

    Thanks,
    Clay

  2. #2
    Join Date
    Aug 2004
    Location
    London, UK
    Posts
    36

    Default

    It works for me, I run some Spock tests along with the usual Junit test.
    Are you sure your STS installation includes the Groovy-Eclipse Plugin? Because it's that plugin the one that allows to run Spock specifications as regular Junit tests.
    Ale Sarco

  3. #3
    Join Date
    May 2009
    Location
    Vancouver
    Posts
    274

    Default

    The appearance of 'RunAs>JUnit' will be conditional on the Spock AST transform having run successfully. I am going to add some support shortly that will enable us to determine what Ast transforms are being run against groovy projects whilst they are being compiled, but I haven't done it yet. Can you perhaps try a smaller sample project perhaps with maven out of the equation and confirm it is OK? (So just a test class and the spock jar on the project classpath)

    cheers
    Andy
    ---
    Andy Clement
    SpringSource Tool Suite Team

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •