Skip to content

Commit

Permalink
clear formatters between runs
Browse files Browse the repository at this point in the history
- Closes #435.
  • Loading branch information
johnbintz authored and dchelimsky committed Aug 7, 2011
1 parent 78024c2 commit 371fc52
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/rspec/core/configuration.rb
Expand Up @@ -66,6 +66,7 @@ def initialize


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


# :call-seq: # :call-seq:
Expand Down
8 changes: 8 additions & 0 deletions spec/rspec/core/configuration_spec.rb
Expand Up @@ -886,5 +886,13 @@ def metadata_hash(*args)
end end
end end


describe "#reset" do
it "resets the reporter and formatters" do
config.reporter
config.formatters.should_not be_empty
config.reset
config.formatters.should be_empty
end
end
end end
end end

0 comments on commit 371fc52

Please sign in to comment.