greghaskins / spectrum

A BDD-style test runner for Java 8. Inspired by Jasmine, RSpec, and Cucumber.
MIT License
145 stars 23 forks source link

Reuse test suites in different specs #135

Closed A11oW closed 6 years ago

A11oW commented 6 years ago

How I can reuse spec or test suite? For example I have spec for authorization and I would like use it in different specs. Something like:

file Authorization.java:

class Authorization {{
  describe("Authorization user", ()->{...})
}}

file Spec1.java:

class Spec1 {{
  // use Authorization Spec
}}

file Spec2.java:

class Spec2 {{
  // use Authorization Spec
}}