before.all seems to be executed for each example group (good) and again for all inner groups (bad?). Perhaps this is even WAI and the "fix" is more clarification in the docs?
This behavior started once I updated:
$ mamba --version
0.8.6
# ^ This version was OK.
$ pip install mamba -U
Collecting mamba
Downloading mamba-0.9.2.tar.gz
# (...snip...)
Here's a sample test:
from spec.mamba import *
times_called = 0
with description('has before all'):
with before.all:
global times_called
print('Running before.all')
times_called += 1
with it('should have run before.all once'):
expect(times_called).to(equal(1))
with description('inner description'):
with it('should have run before.all once'):
expect(times_called).to(equal(1)) # Fails; times_called == 2.
with context('inner context'):
with it('should have run before.all once'):
expect(times_called).to(equal(1)) # Fails; times_called == 3.
before.all
seems to be executed for each example group (good) and again for all inner groups (bad?). Perhaps this is even WAI and the "fix" is more clarification in the docs?This behavior started once I updated:
Here's a sample test: