For now, for your snipper there's no variable @calls_count could be shared between two instances of Execute class
BDDSM.describe do
def with_calls_counted
@calls_count ||= 0
@calls_count += 1
yield
end
let(:two) { with_calls_counted { one + 1 } }
it do
expect(two).to eq 2
expect(@calls_count).to eq 1
end
end
For now, for your snipper there's no variable @calls_count could be shared between two instances of Execute class