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

Commit 8d38f48

Browse files
committed
Remove dead code.
1 parent 76e6976 commit 8d38f48

File tree

8 files changed

+4
-43
lines changed

8 files changed

+4
-43
lines changed

lib/rspec/core/backtrace_formatter.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ def format_backtrace(backtrace, options={})
4747

4848
def backtrace_line(line)
4949
Metadata.relative_path(line) unless exclude?(line)
50-
rescue SecurityError
51-
nil
5250
end
5351

5452
def exclude?(line)

lib/rspec/core/example.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -460,14 +460,6 @@ def location_description
460460
"example at #{location}"
461461
end
462462

463-
def skip_message
464-
if String === skip
465-
skip
466-
else
467-
Pending::NO_REASON_GIVEN
468-
end
469-
end
470-
471463
# Represents the result of executing an example.
472464
# Behaves like a hash for backwards compatibility.
473465
class ExecutionResult

lib/rspec/core/filter_manager.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,6 @@ def add_with_low_priority(*args)
183183
apply_standalone_filter(*args) || super
184184
end
185185

186-
def use(*args)
187-
apply_standalone_filter(*args) || super
188-
end
189-
190186
def include_example?(example)
191187
@rules.empty? || super
192188
end

lib/rspec/core/formatters/documentation_formatter.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ def next_failure_index
6464
def current_indentation
6565
' ' * @group_level
6666
end
67-
68-
def example_group_chain
69-
example_group.parent_groups.reverse
70-
end
7167
end
7268
end
7369
end

lib/rspec/core/formatters/html_formatter.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ def example_failed(failure)
7474
:message => exception.message,
7575
:backtrace => failure.formatted_backtrace.join("\n")
7676
}
77-
else
78-
false
7977
end
8078
extra = extra_failure_content(failure)
8179

@@ -85,8 +83,7 @@ def example_failed(failure)
8583
example.execution_result.run_time,
8684
@failed_examples.size,
8785
exception_details,
88-
(extra == "") ? false : extra,
89-
true
86+
(extra == "") ? false : extra
9087
)
9188
@printer.flush
9289
end

lib/rspec/core/formatters/html_printer.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def print_example_passed(description, run_time)
3535

3636
# rubocop:disable Style/ParameterLists
3737
def print_example_failed(pending_fixed, description, run_time, failure_id,
38-
exception, extra_content, escape_backtrace=false)
38+
exception, extra_content)
3939
# rubocop:enable Style/ParameterLists
4040
formatted_run_time = "%.5f" % run_time
4141

@@ -45,11 +45,7 @@ def print_example_failed(pending_fixed, description, run_time, failure_id,
4545
@output.puts " <div class=\"failure\" id=\"failure_#{failure_id}\">"
4646
if exception
4747
@output.puts " <div class=\"message\"><pre>#{h(exception[:message])}</pre></div>"
48-
if escape_backtrace
49-
@output.puts " <div class=\"backtrace\"><pre>#{h exception[:backtrace]}</pre></div>"
50-
else
51-
@output.puts " <div class=\"backtrace\"><pre>#{exception[:backtrace]}</pre></div>"
52-
end
48+
@output.puts " <div class=\"backtrace\"><pre>#{h exception[:backtrace]}</pre></div>"
5349
end
5450
@output.puts extra_content if extra_content
5551
@output.puts " </div>"

lib/rspec/core/metadata.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ def self.relative_path(line)
4646
line = line.sub(/\A([^:]+:\d+)$/, '\\1'.freeze)
4747
return nil if line == '-e:1'.freeze
4848
line
49-
rescue SecurityError
50-
nil
5149
end
5250

5351
# @private
@@ -99,12 +97,6 @@ def self.deep_hash_dup(object)
9997
end
10098
end
10199

102-
# @private
103-
def self.backtrace_from(block)
104-
return caller unless block.respond_to?(:source_location)
105-
[block.source_location.join(':')]
106-
end
107-
108100
# @private
109101
def self.id_from(metadata)
110102
"#{metadata[:rerun_file_path]}[#{metadata[:scoped_id]}]"

lib/rspec/core/world.rb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,7 @@ def announce_filters
137137
example_groups.clear
138138
if filter_manager.empty?
139139
reporter.message("No examples found.")
140-
elsif exclusion_filter.empty?
141-
message = everything_filtered_message
142-
if @configuration.run_all_when_everything_filtered?
143-
message << "; ignoring #{inclusion_filter.description}"
144-
end
145-
reporter.message(message)
146-
elsif inclusion_filter.empty?
140+
elsif exclusion_filter.empty? || inclusion_filter.empty?
147141
reporter.message(everything_filtered_message)
148142
end
149143
end

0 commit comments

Comments
 (0)