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
Post a Comment