-
Notifications
You must be signed in to change notification settings - Fork 470
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make @PendingFeature repeatable (#1030)
- Loading branch information
Showing
5 changed files
with
172 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
spock-specs/src/test/groovy/org/spockframework/docs/extension/PendingFeatureDocSpec.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package org.spockframework.docs.extension | ||
|
||
import org.spockframework.runtime.extension.builtin.PreconditionContext | ||
import spock.lang.PendingFeature | ||
import spock.lang.PendingFeatureIf | ||
import spock.lang.Specification | ||
|
||
class PendingFeatureDocSpec extends Specification { | ||
// tag::example-a[] | ||
@PendingFeature | ||
def "not implemented yet"() { | ||
// end::example-a[] | ||
expect: | ||
false | ||
} | ||
|
||
// tag::example-b[] | ||
@PendingFeature( | ||
exceptions = UnsupportedOperationException, | ||
reason = 'operation not yet supported') | ||
@PendingFeature( | ||
exceptions = IllegalArgumentException, | ||
reason = 'arguments are broken') | ||
@PendingFeatureIf( | ||
value = { os.windows }, | ||
reason = 'Does not yet work on Windows') | ||
def "I have various problems in certain situations"() { | ||
// end::example-b[] | ||
expect: | ||
throw new IllegalArgumentException() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters