Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Clear out formatters when resetting configuration #434

Closed
johnbintz opened this Issue · 2 comments

2 participants

@johnbintz

I'm using RSpec with Hydra, which calls RSpec::Core::Runner.run once for each file that is sent to each Hydra runner. Calling RSpec.reset resets most of the environment for the Hydra use case, but doesn't clear out the @formatters between each run. This means that running 10 files in a Hydra runner causes 10 copies of the RSpec output to be sent to the user on the last run, which is very confusing indeed.

Resetting @formatters in RSpec::Core::Configuration#reset fixes this issue:

def reset
  @reporter = nil
  @formatters = []
end

I can't see a case where one would want to destroy the reporter but keep the old formatters around, but please correct me otherwise.

@dchelimsky
Owner

Seems reasonable. Wanna patch it and send a pull request?

@johnbintz

Done and done: #435.

@johnbintz johnbintz closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.