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

Commit 1cb2aa7

Browse files
committed
Remove deprecated rerun_argument example method
1 parent b0821fc commit 1cb2aa7

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Breaking Changes:
2626
* Remove support for Mocha version < 1.0. (Phil Pirozhkov, #2864)
2727
* Remove deprecated `PendingExampleFixedNotification` and
2828
`PendingExampleFailedAsExpectedNotification` classes. (Phil Pirozhkov, #2864)
29+
* Remove deprecated `rerun_argument` example method. (Phil Pirozhkov, #2864)
2930

3031
Enhancements:
3132

lib/rspec/core/example.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,6 @@ def location_rerun_argument
105105
end
106106
end
107107

108-
# Returns the location-based argument that can be passed to the `rspec` command to rerun this example.
109-
#
110-
# @deprecated Use {#location_rerun_argument} instead.
111-
# @note If there are multiple examples identified by this location, they will use {#id}
112-
# to rerun instead, but this method will still return the location (that's why it is deprecated!).
113-
def rerun_argument
114-
location_rerun_argument
115-
end
116-
117108
# @return [String] the unique id of this example. Pass
118109
# this at the command line to re-run this exact example.
119110
def id

spec/rspec/core/example_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ def metadata_hash(*args)
3232
end
3333
end
3434

35-
describe "#rerun_argument" do
35+
describe "#location_rerun_argument" do
3636
it "returns the location-based rerun argument" do
3737
allow(RSpec.configuration).to receive_messages(:loaded_spec_files => [__FILE__])
3838
example = RSpec.describe.example
39-
expect(example.rerun_argument).to eq("#{RSpec::Core::Metadata.relative_path(__FILE__)}:#{__LINE__ - 1}")
39+
expect(example.location_rerun_argument).to eq("#{RSpec::Core::Metadata.relative_path(__FILE__)}:#{__LINE__ - 1}")
4040
end
4141
end
4242

0 commit comments

Comments
 (0)