rspec/rspec-core — pull request #1443 by myronmarston (2014-03-24 03:24:26+00:00)
Title: Remove the automatic call to RSpec.reset.

I was auditing the open issues and saw that #621 is still open. @samphippen's fix in #703 was closed without being merged.

I'm resurrecting this because as far as I can tell, the reset doesn't
provide any useful value to folks running specs
the normal way via the `rspec` command, and it
takes a bit of extra time to do so. It also limits
flexibility as alternate runners can't prevent RSpec
from calling this if they do not want it, but by
us no longer calling it, they can now decide if they
want things reset and can call it at the appropriate time.

In #703, @dchelimsky said:

> I'm concerned by the implications of #621 (comment). @sandro's issue was that clearing the config between runs blew away config that wasn't going to get reloaded. Right now we have no concept of config settings that should be persistent vs those that should be clearable. I'm not even sure we can do that in a universally correct way. I'll ponder this a bit and follow up if anything hits me, but I don't recommend merging this yet as it solves one problem by creating another IMO.

As far as I can tell, this change doesn't actually create any problems, it just gives more control to alternate runners. Am I misunderstanding something, @dchelimsky?

As far as the specific problem surfaced in #621 -- it sounds like the problem is that `spec_helper` is being required and ruby won't re-evaluate it. If users want it to be loaded multiple times I think `load` is a better tool for it than `require`. I think that differentiating between persistent and non-persistent settings is complex and out of scope for rspec-core since I can't imagine how we'd do that well and the use case for it is pretty narrow.

Thoughts on others about this? Mostly I want to resolve the issue once and for all, and this seems like a worthwhile enough change to merge.