scala - Nested describe blocks with nested beforeAll/afterAll methods in ScalaTest? -


we trying translate our old rspecs scalatest funspec. have run problem nesting describe blocks.

in rspec, each nested describe block can have own before/after(:all/:each) blocks added outer scope. useful thing able do, , have made use of it. unfortunately, scalatest can have before/afterall/each() methods @ root level of test class, not being nestable.

is there workaround this?

rspec:

describe 'a person 2 email addresses'   before(:all)     # create data   end    after(:all)     # delete data   end    'should have 2 phone numbers'     # ...   end    describe 'and 1 email address retired'     before(:all)       # change settings     end      'should able delete retired email address'       # ...     end      'should not able retire other email address'       # ...     end   end end 


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -