updated gradle to 1.0
updated all builds to latest library versions renamed specs to end in 'Spec' (easiest solution until we have a plugin for Maven 3.0)
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
import spock.lang.*
|
||||
|
||||
@Unroll
|
||||
class DataDriven extends Specification {
|
||||
class DataDrivenSpec extends Specification {
|
||||
def "maximum of two numbers"() {
|
||||
expect:
|
||||
Math.max(a, b) == c
|
||||
@@ -48,11 +48,11 @@ class DataDriven extends Specification {
|
||||
new Person(name: "Fred") || "Male"
|
||||
new Person(name: "Wilma") || "Female"
|
||||
}
|
||||
}
|
||||
|
||||
private class Person {
|
||||
String name
|
||||
String getSex() {
|
||||
name == "Fred" ? "Male" : "Female"
|
||||
static class Person {
|
||||
String name
|
||||
String getSex() {
|
||||
name == "Fred" ? "Male" : "Female"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ import groovy.sql.Sql
|
||||
import spock.lang.Shared
|
||||
import spock.lang.Specification
|
||||
|
||||
class DatabaseDriven extends Specification {
|
||||
class DatabaseDrivenSpec extends Specification {
|
||||
@Shared sql = Sql.newInstance("jdbc:h2:mem:", "org.h2.Driver")
|
||||
|
||||
// insert data (usually the database would already contain the data)
|
||||
+1
-1
@@ -25,7 +25,7 @@ import static spock.util.matcher.HamcrestMatchers.closeTo
|
||||
* @author Peter Niederwiser
|
||||
* @since 0.5
|
||||
*/
|
||||
class HamcrestMatchers extends Specification {
|
||||
class HamcrestMatchersSpec extends Specification {
|
||||
def "comparing two decimal numbers"() {
|
||||
def myPi = 3.14
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
class HelloSpock extends spock.lang.Specification {
|
||||
class HelloSpockSpec extends spock.lang.Specification {
|
||||
def "length of Spock's and his friends' names"() {
|
||||
expect:
|
||||
name.size() == length
|
||||
+1
-1
@@ -37,7 +37,7 @@ import spock.lang.Specification
|
||||
*
|
||||
* @since 0.4
|
||||
*/
|
||||
class IncludeExcludeExtension extends Specification {
|
||||
class IncludeExcludeExtensionSpec extends Specification {
|
||||
static {
|
||||
System.setProperty "spock.configuration", "IncludeFastConfig.groovy"
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import spock.lang.*
|
||||
*
|
||||
* @since 0.4
|
||||
*/
|
||||
class OrderedInteractions extends Specification {
|
||||
class OrderedInteractionsSpec extends Specification {
|
||||
def "collaborators must be invoked in order"() {
|
||||
def coll1 = Mock(Collaborator)
|
||||
def coll2 = Mock(Collaborator)
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import spock.lang.Specification
|
||||
|
||||
class EmptyStack extends Specification {
|
||||
class EmptyStackSpec extends Specification {
|
||||
def stack = new Stack()
|
||||
|
||||
def "size"() {
|
||||
@@ -43,7 +43,7 @@ class EmptyStack extends Specification {
|
||||
}
|
||||
}
|
||||
|
||||
class StackWithOneElement extends Specification {
|
||||
class StackWithOneElementSpec extends Specification {
|
||||
def stack = new Stack()
|
||||
|
||||
def setup() {
|
||||
@@ -82,7 +82,7 @@ class StackWithOneElement extends Specification {
|
||||
}
|
||||
}
|
||||
|
||||
class StackWithThreeElements extends Specification {
|
||||
class StackWithThreeElementsSpec extends Specification {
|
||||
def stack = new Stack()
|
||||
|
||||
def setup() {
|
||||
+1
-1
@@ -27,7 +27,7 @@ import spock.lang.*
|
||||
* @since 0.4
|
||||
*/
|
||||
@Stepwise
|
||||
class StepwiseExtension extends Specification {
|
||||
class StepwiseExtensionSpec extends Specification {
|
||||
def "step 1"() {
|
||||
expect: true // try to change this to 'false'
|
||||
}
|
||||
@@ -16,7 +16,7 @@ import org.junit.Rule
|
||||
import org.junit.rules.TestName
|
||||
import spock.lang.Specification
|
||||
|
||||
class UsingJUnitRules extends Specification {
|
||||
class UsingJUnitRulesSpec extends Specification {
|
||||
@Rule TestName name
|
||||
|
||||
def "retrieve test name at runtime"() {
|
||||
Reference in New Issue
Block a user