Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "RSpec.reset resets filters"

This reverts commit ba15a2e.
  • Loading branch information...
commit 2d61d169b231faeba493707a8c3dfc103a5be30c 1 parent ba15a2e
@dchelimsky dchelimsky authored
View
4 Changelog.md
@@ -12,10 +12,6 @@ Enhancements
* thanks to Bradley Schaefer for suggesting it and Avdi Grimm for almost
suggesting it.
-Bug fixes
-
-* `RSpec.reset` also resets filters.
-
### 2.10.0 / 2012-05-03
[full changelog](http://github.com/rspec/rspec-core/compare/v2.9.0...v2.10.0)
View
1  lib/rspec/core/configuration.rb
@@ -209,7 +209,6 @@ def force(hash)
def reset
@reporter = nil
@formatters.clear
- filter_manager.reset
end
# @overload add_setting(name)
View
8 lib/rspec/core/filter_manager.rb
@@ -115,13 +115,9 @@ def _warn_deprecated_key(key, updates)
attr_reader :exclusions, :inclusions
def initialize
- reset
- extend(BackwardCompatibility)
- end
-
- def reset
- @inclusions = {}.extend(Describable)
@exclusions = DEFAULT_EXCLUSIONS.dup.extend(Describable)
+ @inclusions = {}.extend(Describable)
+ extend(BackwardCompatibility)
end
def add_location(file_path, line_numbers)
View
5 spec/rspec/core/configuration_spec.rb
@@ -1101,11 +1101,6 @@ def metadata_hash(*args)
config.reset
config.formatters.should be_empty
end
-
- it "resets the filter_manager" do
- config.filter_manager.should_receive(:reset)
- config.reset
- end
end
describe "#force" do
View
16 spec/rspec/core/filter_manager_spec.rb
@@ -252,21 +252,5 @@ def filterable_object_with(args = {})
filter_manager.inclusions.should eq(filter => "a_value")
end
end
-
- describe "#reset" do
- it "clears the inclusions" do
- filter_manager = FilterManager.new
- filter_manager.include :foo => :bar
- filter_manager.reset
- filter_manager.inclusions.should be_empty
- end
-
- it "clears the exclusions" do
- filter_manager = FilterManager.new
- filter_manager.exclude :foo => :bar
- filter_manager.reset
- filter_manager.exclusions.should eq(FilterManager::DEFAULT_EXCLUSIONS)
- end
- end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.