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

Commit b0821fc

Browse files
committed
Remove deprecated PendingExample*Notification classes
1 parent ac7b9cf commit b0821fc

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

Changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ Breaking Changes:
2424
* Remove deprecated `treat_symbols_as_metadata_keys_with_true_values` configuration
2525
option. (Phil Pirozhkov, #2864)
2626
* Remove support for Mocha version < 1.0. (Phil Pirozhkov, #2864)
27+
* Remove deprecated `PendingExampleFixedNotification` and
28+
`PendingExampleFailedAsExpectedNotification` classes. (Phil Pirozhkov, #2864)
2729

2830
Enhancements:
2931

lib/rspec/core/notifications.rb

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,9 @@ def self.for(example)
4242
execution_result = example.execution_result
4343

4444
return SkippedExampleNotification.new(example) if execution_result.example_skipped?
45-
return new(example) unless execution_result.status == :pending || execution_result.status == :failed
45+
return FailedExampleNotification.new(example) if execution_result.status == :pending || execution_result.status == :failed
4646

47-
klass = if execution_result.pending_fixed?
48-
PendingExampleFixedNotification
49-
elsif execution_result.status == :pending
50-
PendingExampleFailedAsExpectedNotification
51-
else
52-
FailedExampleNotification
53-
end
54-
55-
klass.new(example)
47+
new(example)
5648
end
5749

5850
private_class_method :new
@@ -214,12 +206,6 @@ def initialize(example, exception_presenter=Formatters::ExceptionPresenter::Fact
214206
end
215207
end
216208

217-
# @deprecated Use {FailedExampleNotification} instead.
218-
class PendingExampleFixedNotification < FailedExampleNotification; end
219-
220-
# @deprecated Use {FailedExampleNotification} instead.
221-
class PendingExampleFailedAsExpectedNotification < FailedExampleNotification; end
222-
223209
# The `SkippedExampleNotification` extends `ExampleNotification` with
224210
# things useful for specs that are skipped.
225211
#

0 commit comments

Comments
 (0)