File tree 2 files changed +0
-153
lines changed
spock-core/src/main/java/org/spockframework/runtime
spock-specs/src/test/groovy/org/spockframework/runtime 2 files changed +0
-153
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 13
13
*/
14
14
package org.spockframework.runtime
15
15
16
- import org.junit.runner.manipulation.Filter
17
- import org.junit.runner.Description
18
- import org.junit.runner.manipulation.Sorter
19
-
20
16
import spock.lang.Specification
21
17
22
- class SputnikSpec extends Specification {
23
- def " description reflects subsequent filtering" () {
24
- def sputnik = new Sputnik (SputnikSampleSpec )
25
-
26
- expect :
27
- sputnik. description. children. methodName == [" feature1" , " feature2" , " feature3" ]
28
-
29
- when :
30
- sputnik. filter(new Filter () {
31
- @Override
32
- boolean shouldRun (Description description ) {
33
- description. methodName == " feature2"
34
- }
35
- @Override
36
- String describe () {
37
- " filter"
38
- }
39
- })
40
-
41
- then :
42
- sputnik. description. children. methodName == [" feature2" ]
43
- }
44
-
45
- def " description reflects subsequent sorting" () {
46
- def sputnik = new Sputnik (SputnikSampleSpec )
47
-
48
- expect :
49
- sputnik. description. children. methodName == [" feature1" , " feature2" , " feature3" ]
50
-
51
- when :
52
- sputnik. sort(new Sorter (new Comparator<Description > () {
53
- int compare (Description desc1 , Description desc2 ) {
54
- desc2. methodName <=> desc1. methodName
55
- }
56
- }))
57
-
58
- then :
59
- sputnik. description. children. methodName == [" feature3" , " feature2" , " feature1" ]
60
- }
61
- }
62
-
63
18
class SputnikSampleSpec extends Specification {
64
19
def feature1 () {
65
20
expect : true
You can’t perform that action at this time.
0 commit comments