From 3428f61ff5adc582938e9cfdf4245d3ec9a290b4 Mon Sep 17 00:00:00 2001 From: Phil Pirozhkov Date: Sat, 28 Nov 2020 01:21:38 +0300 Subject: [PATCH] Prefer alias_method inside DSL See: https://rubystyle.guide/#alias-method https://github.com/rspec/rspec-core/pull/2787#discussion_r531794918 --- spec/rspec/mocks/verifying_doubles/naming_spec.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/rspec/mocks/verifying_doubles/naming_spec.rb b/spec/rspec/mocks/verifying_doubles/naming_spec.rb index 0a15b28fe..926843ba3 100644 --- a/spec/rspec/mocks/verifying_doubles/naming_spec.rb +++ b/spec/rspec/mocks/verifying_doubles/naming_spec.rb @@ -45,37 +45,37 @@ def error_message_for(_) describe "instance_double" do it_behaves_like "a named verifying double", "InstanceDouble" do - alias :create_double :instance_double + alias_method :create_double, :instance_double end end describe "instance_spy" do it_behaves_like "a named verifying double", "InstanceDouble" do - alias :create_double :instance_spy + alias_method :create_double, :instance_spy end end describe "class_double" do it_behaves_like "a named verifying double", "ClassDouble" do - alias :create_double :class_double + alias_method :create_double, :class_double end end describe "class_spy" do it_behaves_like "a named verifying double", "ClassDouble" do - alias :create_double :class_spy + alias_method :create_double, :class_spy end end describe "object_double" do it_behaves_like "a named verifying double", "ObjectDouble" do - alias :create_double :object_double + alias_method :create_double, :object_double end end describe "object_spy" do it_behaves_like "a named verifying double", "ObjectDouble" do - alias :create_double :object_spy + alias_method :create_double, :object_spy end end end