Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit 5a07475

Browse files
committed
rename LookupSet to Set
1 parent 1f4f080 commit 5a07475

File tree

10 files changed

+15
-15
lines changed

10 files changed

+15
-15
lines changed

lib/rspec/core.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
version
1212
warnings
1313

14-
lookup_set
14+
set
1515
flat_map
1616
filter_manager
1717
dsl

lib/rspec/core/configuration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ def initialize
306306

307307
@mock_framework = nil
308308
@files_or_directories_to_run = []
309-
@loaded_spec_files = LookupSet.new
309+
@loaded_spec_files = Set.new
310310
@color = false
311311
@pattern = '**{,/*/**}/*_spec.rb'
312312
@exclude_pattern = ''

lib/rspec/core/configuration_options.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ def organize_options
5252
end
5353
end
5454

55-
UNFORCED_OPTIONS = LookupSet.new([
55+
UNFORCED_OPTIONS = Set.new([
5656
:requires, :profile, :drb, :libs, :files_or_directories_to_run,
5757
:full_description, :full_backtrace, :tty
5858
])
5959

60-
UNPROCESSABLE_OPTIONS = LookupSet.new([:formatters])
60+
UNPROCESSABLE_OPTIONS = Set.new([:formatters])
6161

6262
def force?(key)
6363
!UNFORCED_OPTIONS.include?(key)

lib/rspec/core/formatters.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ def built_in_formatter(key)
196196
end
197197

198198
def notifications_for(formatter_class)
199-
formatter_class.ancestors.inject(::RSpec::Core::LookupSet.new) do |notifications, klass|
200-
notifications.merge Loader.formatters.fetch(klass) { ::RSpec::Core::LookupSet.new }
199+
formatter_class.ancestors.inject(::RSpec::Core::Set.new) do |notifications, klass|
200+
notifications.merge Loader.formatters.fetch(klass) { ::RSpec::Core::Set.new }
201201
end
202202
end
203203

lib/rspec/core/formatters/deprecation_formatter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class DeprecationFormatter
1212
def initialize(deprecation_stream, summary_stream)
1313
@deprecation_stream = deprecation_stream
1414
@summary_stream = summary_stream
15-
@seen_deprecations = LookupSet.new
15+
@seen_deprecations = Set.new
1616
@count = 0
1717
end
1818
alias :output :deprecation_stream

lib/rspec/core/metadata_filter.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ class QueryOptimized < UpdateOptimized
147147

148148
def initialize(applies_predicate)
149149
super
150-
@applicable_keys = LookupSet.new
151-
@proc_keys = LookupSet.new
150+
@applicable_keys = Set.new
151+
@proc_keys = Set.new
152152
@memoized_lookups = Hash.new do |hash, applicable_metadata|
153153
hash[applicable_metadata] = find_items_for(applicable_metadata)
154154
end

lib/rspec/core/reporter.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module RSpec::Core
33
# spec suite run.
44
class Reporter
55
# @private
6-
RSPEC_NOTIFICATIONS = LookupSet.new(
6+
RSPEC_NOTIFICATIONS = Set.new(
77
[
88
:close, :deprecation, :deprecation_summary, :dump_failures, :dump_pending,
99
:dump_profile, :dump_summary, :example_failed, :example_group_finished,
@@ -13,7 +13,7 @@ class Reporter
1313

1414
def initialize(configuration)
1515
@configuration = configuration
16-
@listeners = Hash.new { |h, k| h[k] = LookupSet.new }
16+
@listeners = Hash.new { |h, k| h[k] = Set.new }
1717
@examples = []
1818
@failed_examples = []
1919
@pending_examples = []

lib/rspec/core/lookup_set.rb renamed to lib/rspec/core/set.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module Core
88
# peice of the stdlib. This helps to prevent false positive
99
# builds.
1010
#
11-
class LookupSet
11+
class Set
1212
include Enumerable
1313

1414
def initialize(array=[])

spec/rspec/core/formatters/base_text_formatter_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
end
5353

5454
def output_from_running(example_group)
55-
allow(RSpec.configuration).to receive(:loaded_spec_files) { RSpec::Core::LookupSet.new([File.expand_path(__FILE__)]) }
55+
allow(RSpec.configuration).to receive(:loaded_spec_files) { RSpec::Core::Set.new([File.expand_path(__FILE__)]) }
5656
example_group.run(reporter)
5757
examples = example_group.examples
5858
send_notification :dump_summary, summary_notification(1, examples, examples, [], 0)

spec/rspec/core/lookup_set_spec.rb renamed to spec/rspec/core/set_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
RSpec.describe 'RSpec::Core::LookupSet' do
1+
RSpec.describe 'RSpec::Core::Set' do
22

3-
let(:set) { RSpec::Core::LookupSet.new([1, 2, 3]) }
3+
let(:set) { RSpec::Core::Set.new([1, 2, 3]) }
44

55
it 'takes an array of values' do
66
expect(set).to include(1, 2, 3)

0 commit comments

Comments
 (0)