thentos
thentos copied to clipboard
hspec open questions
In FrontendSpec
, we say, after several other tests and after the before
and after
wrapper:
-- (this is a separate top-level test case because it changes the DB
-- state and gets the other tests confused.)
describe "update user" . before setupTestServerFull . after teardownTestServerFull $ do
spec_updateSelf
I thought though that each it
should run in a state pristinely constructed by before
, and torn down right after
. See tests described as meta
in ThentosSpec
. What's with that?
The text above is confusing, let me clarify:
- is there any way we can run several
it
s in the same before-after bracket? - how can we make tests faster?
- (see above) remove misleading comment and consider restructuring test cases.
There's beforeAll
, afterAll
that would do this (though by now FrontendSpec uses around
, which doesn't have an aroundAll
variant).