From 92150d570a174fa14f9e7e044d055235b447e5a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aslak=20Helles=C3=B8y?= Date: Thu, 17 May 2012 17:58:34 +0100 Subject: [PATCH] Fixed regression from v1.0.6 in Scala module - glue code wasn't loaded at all. Closes #321 --- History.md | 4 ++++ scala/src/main/scala/cucumber/runtime/ScalaBackend.scala | 5 +++-- scala/src/test/scala/cucumber/runtime/RunCukesTest.scala | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index 330ffcb7b4..772d52e64f 100644 --- a/History.md +++ b/History.md @@ -1,3 +1,7 @@ +## [Git master](https://github.com/cucumber/cucumber-jvm/compare/v1.0.7...master) + +* [Scala] Fixed regression from v1.0.6 in Scala module - glue code wasn't loaded at all. ([#321](https://github.com/cucumber/cucumber-jvm/issues/321) Aslak Hellesøy) + ## [1.0.8](https://github.com/cucumber/cucumber-jvm/compare/v1.0.7...v1.0.8) * [Core] Ability to create `DataTable` objects from a List of objects while specifying what header columns (fields) to use (Aslak Hellesøy) diff --git a/scala/src/main/scala/cucumber/runtime/ScalaBackend.scala b/scala/src/main/scala/cucumber/runtime/ScalaBackend.scala index 1697cde748..4936d8bba7 100644 --- a/scala/src/main/scala/cucumber/runtime/ScalaBackend.scala +++ b/scala/src/main/scala/cucumber/runtime/ScalaBackend.scala @@ -31,9 +31,10 @@ class ScalaBackend(ignore:ResourceLoader) extends Backend { //I don't believe scala has to do anything to clean out it's world } - def loadGlue(glue: Glue, gluePaths: JList[String]) { + def loadGlue(glue: Glue, gluePaths: JList[String]) { val cl = new ClasspathResourceLoader(Thread.currentThread().getContextClassLoader) - val dslClasses = gluePaths flatMap {cl.getDescendants(classOf[ScalaDsl], _) } filter { cls => + val packages = gluePaths map { cucumber.io.MultiLoader.packageName(_) } + val dslClasses = packages flatMap { cl.getDescendants(classOf[ScalaDsl], _) } filter { cls => try { cls.getDeclaredConstructor() true diff --git a/scala/src/test/scala/cucumber/runtime/RunCukesTest.scala b/scala/src/test/scala/cucumber/runtime/RunCukesTest.scala index 883b56586d..0edc730811 100644 --- a/scala/src/test/scala/cucumber/runtime/RunCukesTest.scala +++ b/scala/src/test/scala/cucumber/runtime/RunCukesTest.scala @@ -4,4 +4,5 @@ import org.junit.runner.RunWith import cucumber.junit.Cucumber @RunWith(classOf[Cucumber]) +@Cucumber.Options(strict=true) class RunCukesTest \ No newline at end of file