Skip to content

Commit dd7e209

Browse files
authored
Merge pull request #307 from cucumber/upgrade-cucumber-750
Upgrade cucumber to 7.5.0
2 parents bc0a3af + d36f52c commit dd7e209

File tree

5 files changed

+35
-3
lines changed

5 files changed

+35
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,17 @@ See also the [CHANGELOG](https://github.com/cucumber/cucumber-jvm/blob/master/CH
1313

1414
### Changed
1515

16+
- [Core] Updated `cucumber-core` dependency to [7.5.0](https://github.com/cucumber/cucumber-jvm/blob/main/CHANGELOG.md)
17+
- [Scala] Upgrade `scala-collection-compat` to 2.8.0
18+
1619
### Deprecated
1720

1821
### Removed
1922

2023
### Fixed
2124

25+
- [Scala] Process glue classes distinctly ([#2582](https://github.com/cucumber/cucumber-jvm/pull/2582))
26+
2227
## [8.5.1] (2022-06-24)
2328

2429
### Changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ scalaVersion := scala213
3838

3939
// Library versions
4040

41-
val cucumberVersion = "7.4.1"
41+
val cucumberVersion = "7.5.0"
4242
val jacksonVersion = "2.13.3"
4343
val mockitoScalaVersion = "1.17.7"
4444
val junitVersion = "4.13.2"

cucumber-scala/src/main/scala/io/cucumber/scala/ScalaBackend.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ class ScalaBackend(
7777
.asScala
7878
)
7979
.filter(glueClass => !glueClass.isInterface)
80+
.distinct
8081

8182
// Voluntarily throw exception if not able to identify if it's a class
8283
val (clsClasses, objClasses) =

cucumber-scala/src/test/scala/io/cucumber/scala/ScalaBackendTest.scala

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,32 @@ class ScalaBackendTest {
182182
verify(fakeLookup, never()).getInstance(any())
183183
}
184184

185+
@Test
186+
def loadGlueAndBuildWorld_once_by_classpath_url(): Unit = {
187+
// Load glue
188+
backend.loadGlue(
189+
fakeGlue,
190+
List(
191+
URI.create("classpath:io/cucumber/scala/steps/classes"),
192+
URI.create("classpath:io/cucumber/scala/steps/classes")
193+
).asJava
194+
)
195+
196+
assertEquals(3, backend.scalaGlueClasses.size)
197+
assertTrue(
198+
backend.scalaGlueClasses.toSet == Set(
199+
classOf[StepsA],
200+
classOf[StepsB],
201+
classOf[StepsC]
202+
)
203+
)
204+
205+
verify(fakeContainer, times(3)).addClass(any())
206+
verify(fakeContainer, times(1)).addClass(classOf[StepsA])
207+
verify(fakeContainer, times(1)).addClass(classOf[StepsB])
208+
verify(fakeContainer, times(1)).addClass(classOf[StepsC])
209+
}
210+
185211
@Test
186212
def loadGlueAndBuildWorld_class_incorrect_hooks_definitions(): Unit = {
187213
val result = Try {

project/build-dependencies.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
libraryDependencies += "io.cucumber" % "cucumber-core" % "7.4.1"
2-
libraryDependencies += "org.scala-lang.modules" %% "scala-collection-compat" % "2.7.0"
1+
libraryDependencies += "io.cucumber" % "cucumber-core" % "7.5.0"
2+
libraryDependencies += "org.scala-lang.modules" %% "scala-collection-compat" % "2.8.0"

0 commit comments

Comments
 (0)