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

Commit 76561bd

Browse files
committed
Improve (legacy) any_instance documentation example
Using the variable name `instance` keeps the general nature of the name, while making it more intuitive, due to proximity to the call `any_instance_of`. See discussion (starting) at https://git.io/JUk98.
1 parent 018d0d5 commit 76561bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

features/working_with_legacy_code/any_instance.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ Feature: Any Instance
8383
"""ruby
8484
RSpec.describe "allow_any_instance_of" do
8585
it 'yields the receiver to the block implementation' do
86-
allow_any_instance_of(String).to receive(:slice) do |value, start, length|
87-
value[start, length]
86+
allow_any_instance_of(String).to receive(:slice) do |instance, start, length|
87+
instance[start, length]
8888
end
8989
9090
expect('string'.slice(2, 3)).to eq('rin')

0 commit comments

Comments
 (0)