Skip to content

Commit ee76bbf

Browse files
committed
Fix for issue skipoleschris#16. Failing tests when running the cucumber task now cause the build to fail.
1 parent fd2645a commit ee76bbf

File tree

12 files changed

+22
-13
lines changed

12 files changed

+22
-13
lines changed

Diff for: README.markdown

+5-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ To install the cucumber plugin, add entries to the build plugins file (project/p
120120

121121
resolvers += "Templemore Repository" at "http://templemore.co.uk/repo"
122122

123-
addSbtPlugin("templemore" % "sbt-cucumber-plugin" % "0.7.1")
123+
addSbtPlugin("templemore" % "sbt-cucumber-plugin" % "0.7.2")
124124

125125
### Basic Configuration ###
126126
To add the cucumber plugin settings to a basic project, just add the following to the build.sbt file:
@@ -213,6 +213,10 @@ Requests for features can be posted to the issues list or emailed to the author.
213213

214214
## Release History ##
215215

216+
### 0.7.2 ###
217+
218+
Fix for issue #16. Failing cucumber tests now cause the build to report an error.
219+
216220
### 0.7.1 ###
217221

218222
Fix for issue #15. The templemore repository is now added as a resolver to the project when the plugin is added.

Diff for: plugin/src/main/scala/templemore/sbt/cucumber/CucumberPlugin.scala

+7-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import templemore.sbt.util._
1010
*/
1111
object CucumberPlugin extends Plugin with Integration {
1212

13-
private val projectVersion = "0.7.1"
13+
private val projectVersion = "0.7.2"
1414

1515
type LifecycleCallback = () => Unit
1616

@@ -43,7 +43,12 @@ object CucumberPlugin extends Plugin with Integration {
4343
val cucumberAfter = SettingKey[LifecycleCallback]("cucumber-after")
4444

4545
protected def cucumberTask(argTask: TaskKey[Seq[String]]) =
46-
(argTask, cucumberTestSettings, cucumberOptions, cucumberOutput, streams) map(cuke)
46+
(argTask, cucumberTestSettings, cucumberOptions, cucumberOutput, streams) map {
47+
(args, settings, opt, out, s) => cuke(args, settings, opt, out, s) match {
48+
case 0 => 0
49+
case _ => sys.error("There were failed tests.")
50+
}
51+
}
4752

4853
protected def cucumberSettingsTask: Initialize[Task[JvmSettings]] =
4954
(fullClasspath in Test, cucumberMainClass, streams, cucumberSystemProperties, cucumberJVMOptions, cucumberMaxMemory, cucumberMaxPermGen) map {

Diff for: project/Build.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Keys._
44
object Settings {
55
val buildOrganization = "templemore"
66
val buildScalaVersion = "2.9.2"
7-
val buildVersion = "0.7.1"
7+
val buildVersion = "0.7.2"
88

99
val buildSettings = Defaults.defaultSettings ++
1010
Seq (organization := buildOrganization,

Diff for: testProjects/integrationTestIntegrationProject/project/Build.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import templemore.sbt.cucumber.CucumberPlugin
55
object BuildSettings {
66
val buildOrganization = "templemore"
77
val buildScalaVersion = "2.9.2"
8-
val buildVersion = "0.7.1"
8+
val buildVersion = "0.7.2"
99

1010
val buildSettings = Defaults.defaultSettings ++
1111
Seq (organization := buildOrganization,
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
resolvers += "Templemore Repository" at "http://templemore.co.uk/repo"
22

3-
addSbtPlugin("templemore" % "sbt-cucumber-plugin" % "0.7.1")
3+
addSbtPlugin("templemore" % "sbt-cucumber-plugin" % "0.7.2")
44

55

Diff for: testProjects/multiModuleTestProject/project/Build.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import templemore.sbt.cucumber.CucumberPlugin
55
object BuildSettings {
66
val buildOrganization = "templemore"
77
val buildScalaVersion = "2.9.2"
8-
val buildVersion = "0.7.1"
8+
val buildVersion = "0.7.2"
99

1010
val buildSettings = Defaults.defaultSettings ++
1111
Seq (organization := buildOrganization,
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
resolvers += Resolver.file("Local Repo", file((Path.userHome / ".m2" / "repository").toString))
22

3-
addSbtPlugin("templemore" % "sbt-cucumber-plugin" % "0.7.1")
3+
addSbtPlugin("templemore" % "sbt-cucumber-plugin" % "0.7.2")

Diff for: testProjects/testIntegrationProject/build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name := "test-project"
22

3-
version := "0.7.1"
3+
version := "0.7.2"
44

55
organization := "templemore"
66

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
resolvers += "Templemore Repository" at "http://templemore.co.uk/repo"
22

3-
addSbtPlugin("templemore" % "sbt-cucumber-plugin" % "0.7.1")
3+
addSbtPlugin("templemore" % "sbt-cucumber-plugin" % "0.7.2")
44

55

Diff for: testProjects/testProject/project/plugin.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
resolvers += "Templemore Repository" at "http://templemore.co.uk/repo"
22

3-
addSbtPlugin("templemore" % "sbt-cucumber-plugin" % "0.7.1")
3+
addSbtPlugin("templemore" % "sbt-cucumber-plugin" % "0.7.2")
44

55

Diff for: testProjects/testProject2_10/build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name := "test-project2_10"
22

3-
version := "0.7.1"
3+
version := "0.7.2"
44

55
organization := "templemore"
66

Diff for: testProjects/testProject2_10/project/plugin.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
resolvers += "Templemore Repository" at "http://templemore.co.uk/repo"
22

3-
addSbtPlugin("templemore" % "sbt-cucumber-plugin" % "0.7.1")
3+
addSbtPlugin("templemore" % "sbt-cucumber-plugin" % "0.7.2")

0 commit comments

Comments
 (0)