From a512aa11dd41a7afb68af5f6f8bf131ca9325593 Mon Sep 17 00:00:00 2001 From: etorreborre Date: Wed, 8 Sep 2021 22:31:11 +0200 Subject: [PATCH] fix: use () for before/after All methods --- .../org/specs2/specification/Contexts.scala | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/core/src/main/scala/org/specs2/specification/Contexts.scala b/core/src/main/scala/org/specs2/specification/Contexts.scala index 6375461936..f7476d9674 100644 --- a/core/src/main/scala/org/specs2/specification/Contexts.scala +++ b/core/src/main/scala/org/specs2/specification/Contexts.scala @@ -148,29 +148,29 @@ trait BeforeAfterSpec extends SpecificationStructure with FragmentsFactory: */ @deprecated(since="5.0.0") trait BeforeAll extends SpecificationStructure with FragmentsFactory: - def beforeAll: Unit + def beforeAll(): Unit override def map(fs: =>Fragments): Fragments = - super.map(fs).prepend(fragmentFactory.step(beforeAll)).append(fragmentFactory.markAs(AlwaysTag)) + super.map(fs).prepend(fragmentFactory.step(beforeAll())).append(fragmentFactory.markAs(AlwaysTag)) /** Execute a step after all other fragments */ @deprecated(since="5.0.0") trait AfterAll extends SpecificationStructure with FragmentsFactory: - def afterAll: Unit + def afterAll(): Unit override def map(fs: =>Fragments): Fragments = - super.map(fs).append(fragmentFactory.step(afterAll)).append(fragmentFactory.markAs(AlwaysTag)) + super.map(fs).append(fragmentFactory.step(afterAll())).append(fragmentFactory.markAs(AlwaysTag)) /** Execute a step before and after all other fragments */ @deprecated(since="5.0.0") trait BeforeAfterAll extends SpecificationStructure with FragmentsFactory: - def beforeAll: Unit - def afterAll: Unit + def beforeAll(): Unit + def afterAll(): Unit override def map(fs: =>Fragments): Fragments = super .map(fs) - .prepend(fragmentFactory.step(beforeAll)).append(fragmentFactory.markAs(AlwaysTag)) - .append(fragmentFactory.step(afterAll)).append(fragmentFactory.markAs(AlwaysTag)) + .prepend(fragmentFactory.step(beforeAll())).append(fragmentFactory.markAs(AlwaysTag)) + .append(fragmentFactory.step(afterAll())).append(fragmentFactory.markAs(AlwaysTag))