Skip to content

Commit

Permalink
feature: added back the Before/After All traits for better backward c…
Browse files Browse the repository at this point in the history
…ompatibility
  • Loading branch information
symbiont-eric-torreborre committed Sep 8, 2021
1 parent aa0f3eb commit c0ecdee
Showing 1 changed file with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,34 @@ trait BeforeAfterSpec extends SpecificationStructure with FragmentsFactory:
.map(fs)
.prepend(beforeSpec.append(fragmentFactory.markAs(AlwaysTag)))
.append(afterSpec.append(fragmentFactory.markAs(AlwaysTag)))

/** Execute a step before all other fragments
*/
@deprecated(since="5.0.0")
trait BeforeAll extends SpecificationStructure with FragmentsFactory:
def beforeAll: Unit

override def map(fs: =>Fragments): Fragments =
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

override def map(fs: =>Fragments): Fragments =
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

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))

0 comments on commit c0ecdee

Please sign in to comment.