Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Remove extra mocks teardowns/sandboxing #1242

Merged
merged 3 commits into from Jan 9, 2014

Conversation

Projects
None yet
2 participants
Owner

myronmarston commented Jan 7, 2014

This goes along with rspec/rspec-mocks#519.

@myronmarston myronmarston Don't verify/teardown mocks extra times.
The new rspec-mocks lifecycle logic supports
nested mock spaces, based on calling setup
or teardown extra times. It's important
they are only called once per example.
6661803
Owner

JonRowe commented Jan 7, 2014

I assume the changes to Gemfile and script/test_all are just until rspec/rspec-mocks#519 is merged? I like the fact we're removing a big chunk of sandbox cruft here :)

Owner

myronmarston commented Jan 7, 2014

yep, see the commit message on that commit :).

Owner

JonRowe commented Jan 7, 2014

Ahh, hidden behind a ... ;)

myronmarston added some commits Jan 7, 2014

@myronmarston myronmarston Use rspec-mocks' new temporary scope support for the sandboxing.
Historically, this sandboxing logic has been brittle. Using
built-in rspec-mocks public APIs will be less brittle.
1500df7
@myronmarston myronmarston Add calls to `super`.
We don't want to modify the mock lifecycle behavior here,
we just want to count the number of calls.
8039cd2
Owner

myronmarston commented Jan 9, 2014

The build is failing with an rspec-expectations failure on ree that I can't repro. I'm going to merge anyway since the rspec-core master build will fail on all rubies until we merge this due to the merge of the rspec-mocks PR.

@myronmarston myronmarston added a commit that referenced this pull request Jan 9, 2014

@myronmarston myronmarston Merge pull request #1242 from rspec/remove-extra-mocks-teardowns
Remove extra mocks teardowns/sandboxing
d4c9fd8

@myronmarston myronmarston merged commit d4c9fd8 into master Jan 9, 2014

1 check failed

default The Travis CI build failed
Details

@myronmarston myronmarston deleted the remove-extra-mocks-teardowns branch Jan 9, 2014

Owner

JonRowe commented Jan 9, 2014

@myronmarston I can reproduce that failure locally, the seed is important, but it shouldnt be a blocker.

Owner

myronmarston commented Jan 9, 2014

@myronmarston I can reproduce that failure locally, the seed is important, but it shouldnt be a blocker.

Cool. Can you open an issue for rspec-expectations with repro steps/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment