Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e09c55d

Browse files
committed
2 parents d485e5f + 4b75a6c commit e09c55d

File tree

3 files changed

+55
-63
lines changed

3 files changed

+55
-63
lines changed

‎README.md‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,36 @@ because the build is fully automated via Maven.
215215
- [Listing 7.13 Running Spock functional tests on a Tomcat instance](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter7/web-ui-example/pom.xml)
216216
- [Listing 7.14 Using JaCoCo with Spock](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter7/spring-standalone-swing/pom.xml)
217217

218+
###Chapter 8
219+
- [Listing 8.1 Expecting an exception in a Spock test](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/test/groovy/com/manning/spock/chapter8/extras/ExceptionControlSpec.groovy)
220+
- [Listing 8.2 Detailed examination of an expected exception](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/test/groovy/com/manning/spock/chapter8/extras/ExceptionControlSpec.groovy)
221+
- [Listing 8.3 Explicit declaration that an exception should not happen](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/test/groovy/com/manning/spock/chapter8/extras/ExceptionControlSpec.groovy)
222+
- [Listing 8.4 Marking a test method with the issue it solves](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/test/groovy/com/manning/spock/chapter8/extras/IssueDocumentationSpec.groovy)
223+
- [Listing 8.5 Using the URL of an issue solved by a Spock test](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/test/groovy/com/manning/spock/chapter8/extras/IssueDocumentationSpec.groovy)
224+
- [Listing 8.6 Marking a Spock test with multiple issues](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/test/groovy/com/manning/spock/chapter8/extras/IssueDocumentationSpec.groovy)
225+
- [Listing 8.7 Declaring a test timeout](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/test/groovy/com/manning/spock/chapter8/extras/TimeoutLimitSpec.groovy)
226+
- [Listing 8.8 Declaring a test timeout - custom unit](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/test/groovy/com/manning/spock/chapter8/extras/TimeoutLimitSpec.groovy)
227+
- [Listing 8.9 Ignoring a single test](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/test/groovy/com/manning/spock/chapter8/extras/SimpleIgnoreSpec.groovy)
228+
- [Listing 8.10 Ignoring all tests apart from one](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/test/groovy/com/manning/spock/chapter8/extras/KeepOneSpec.groovy)
229+
- [Listing 8.11 Skipping Spock tests according to the environment](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/test/groovy/com/manning/spock/chapter8/extras/SimpleConditionalSpec.groovy)
230+
- [Listing 8.12 Skipping a Spock test based on a dynamic precondition](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/test/groovy/com/manning/spock/chapter8/extras/SmartIgnoreSpec.groovy)
231+
- [Listing 8.13 Requires is the opposite of IgnoreIf](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/test/groovy/com/manning/spock/chapter8/extras/RunIfSpec.groovy)
232+
- [Listing 8.14 Release resources with AutoCleanup](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/test/groovy/com/manning/spock/chapter8/extras/AutoCloseSpec.groovy)
233+
- [Listing 8.15 A Spock test with very long setup - DO NOT DO THIS](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/test/groovy/com/manning/spock/chapter8/helper/HelperMethodsSpec.groovy)
234+
- [Listing 8.16 Spock test with helper methods](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/test/groovy/com/manning/spock/chapter8/helper/HelperMethodsSpec.groovy)
235+
- [Listing 8.17 Using arguments that imply their importance in the test](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/test/groovy/com/manning/spock/chapter8/helper/HelperMethodsSpec.groovy)
236+
- [Listing 8.18 Spock test with dubious then: block](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/test/groovy/com/manning/spock/chapter8/helper/HelperMethodsAssertSpec.groovy)
237+
- [Listing 8.19 Improved Spock test with clear separation of checks](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/test/groovy/com/manning/spock/chapter8/helper/HelperMethodsAssertSpec.groovy)
238+
- [Listing 8.20 Using helper methods for assertions](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/test/groovy/com/manning/spock/chapter8/helper/HelperMethodsAssertSpec.groovy)
239+
- [Listing 8.21 Spock tests with questionable then: block](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/test/groovy/com/manning/spock/chapter8/helper/HelperMethodsInteractSpec.groovy)
240+
- [Listing 8.22 Helper methods with interactions need to be declared explicitly](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/test/groovy/com/manning/spock/chapter8/helper/HelperMethodsInteractSpec.groovy)
241+
- [Listing 8.23 Java code with questionable design](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/main/java/com/manning/spock/chapter8/nuker/CameraFeed.java)
242+
- [Listing 8.23 Java code with questionable design](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/main/java/com/manning/spock/chapter8/nuker/HardDriveNuker.java)
243+
- [Listing 8.23 Java code with questionable design](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/main/java/com/manning/spock/chapter8/nuker/SmartHardDriveNuker.java)
244+
- [Listing 8.24 Creating a spy with Spock](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/test/groovy/com/manning/spock/chapter8/spies/SimpleSpySpec.groovy)
245+
- [Listing 8.25 Refactoring Java code to avoid spies](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/main/java/com/manning/spock/chapter8/nuker2/SmartHardDriveNuker.java)
246+
- [Listing 8.26 Using a mock instead of a spy](https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter8/src/test/groovy/com/manning/spock/chapter8/spies/NoSpySpec.groovy)
247+
218248

219249
## Issues with the code.
220250

‎chapter3/build.gradle‎

Lines changed: 0 additions & 61 deletions
This file was deleted.

‎chapter3/pom.xml‎

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
</configuration>
2525
</plugin>
2626
<plugin>
27-
<groupId>org.codehaus.gmavenplus</groupId>
28-
<artifactId>gmavenplus-plugin</artifactId>
27+
<groupId>org.codehaus.gmavenplus</groupId>
28+
<artifactId>gmavenplus-plugin</artifactId>
2929
<version>1.4</version>
3030
<executions>
3131
<execution>
@@ -86,6 +86,29 @@
8686
<artifactId>mockito-all</artifactId>
8787
<version>1.10.19</version>
8888
</dependency>
89+
90+
<!-- Run mvn test and look at build/spock-reports -->
91+
<dependency>
92+
<groupId>com.athaydes</groupId>
93+
<artifactId>spock-reports</artifactId>
94+
<version>1.2.7</version>
95+
<scope>test</scope>
96+
<!-- this avoids affecting your version of Groovy/Spock -->
97+
<exclusions>
98+
<exclusion>
99+
<groupId>*</groupId>
100+
<artifactId>*</artifactId>
101+
</exclusion>
102+
</exclusions>
103+
</dependency>
89104
</dependencies>
90105

106+
<!-- Used only for spock-reports -->
107+
<repositories>
108+
<repository>
109+
<id>jcenter</id>
110+
<name>JCenter Repo</name>
111+
<url>http://jcenter.bintray.com</url>
112+
</repository>
113+
</repositories>
91114
</project>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /