from JUnit to spock

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

from JUnit to spock

THUFIR HAWAT
This is literally my first go with either JUnit or spock:

// Apply the java plugin to add support for Java
   apply plugin: 'java'

// In this section you declare where to find the dependencies of your
project
     repositories {
     mavenCentral()
   }

   sourceSets {
     main {
       java {
         srcDirs 'src/main/' // where the main code is
       }
     }

     test {
       java {
         srcDir 'src/test/' // tests for all the main code
       }
     }
   }

// In this section you declare the dependencies for your production and
test code
   dependencies {
     testCompile 'junit:junit:4.11'
   }

   test {
     testLogging {
       events "passed", "skipped", "failed", "standardOut", "standardError"
     }
   }


   jar  {
     manifest {
       attributes 'Main-Class': 'net.bounceme.mordor.hello.HelloWorld'
     }
   }

task wrapper(type: Wrapper) {
     gradleVersion = '2.4.3'
}




I simply updated the dependencies method to now be:

   dependencies {
     //testCompile 'junit:junit:4.11'
     compile "org.codehaus.groovy:groovy-all:2.4.1"
     testCompile "org.spockframework:spock-core:1.0-groovy-2.4"
   }



Is this build file reasonable?  All I did was just replace the JUnit repo
with groovy and spock.

project:  [hidden email]:THUFIR/hello_gradle.git




thanks,

Thufir

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/spockframework.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: from JUnit to spock

Kostis Kapelonis
Hello

I look at the repo
https://github.com/THUFIR/hello_gradle/tree/master/src/test/java/net/bounceme/mordor/hello
and I don't see any Spock tests at all.

Therefore adding Spock support via Gradle does not really do anything.
What are you trying to accomplish?

On Thu, Feb 4, 2016 at 11:23 AM, Thufir <[hidden email]> wrote:

> This is literally my first go with either JUnit or spock:
>
> // Apply the java plugin to add support for Java
>   apply plugin: 'java'
>
> // In this section you declare where to find the dependencies of your
> project
>     repositories {
>     mavenCentral()
>   }
>
>   sourceSets {
>     main {
>       java {
>         srcDirs 'src/main/' // where the main code is
>       }
>     }
>
>     test {
>       java {
>         srcDir 'src/test/' // tests for all the main code
>       }
>     }
>   }
>
> // In this section you declare the dependencies for your production and test
> code
>   dependencies {
>     testCompile 'junit:junit:4.11'
>   }
>
>   test {
>     testLogging {
>       events "passed", "skipped", "failed", "standardOut", "standardError"
>     }
>   }
>
>
>   jar  {
>     manifest {
>       attributes 'Main-Class': 'net.bounceme.mordor.hello.HelloWorld'
>     }
>   }
>
> task wrapper(type: Wrapper) {
>     gradleVersion = '2.4.3'
> }
>
>
>
>
> I simply updated the dependencies method to now be:
>
>   dependencies {
>     //testCompile 'junit:junit:4.11'
>     compile "org.codehaus.groovy:groovy-all:2.4.1"
>     testCompile "org.spockframework:spock-core:1.0-groovy-2.4"
>   }
>
>
>
> Is this build file reasonable?  All I did was just replace the JUnit repo
> with groovy and spock.
>
> project:  [hidden email]:THUFIR/hello_gradle.git
>
>
>
>
> thanks,
>
> Thufir
>
> --
> You received this message because you are subscribed to the Google Groups
> "Spock Framework - User" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> To post to this group, send email to [hidden email].
> Visit this group at https://groups.google.com/group/spockframework.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/spockframework.
For more options, visit https://groups.google.com/d/optout.
Loading...