Skip to content

Commit

Permalink
Prefer alias_method inside DSL
Browse files Browse the repository at this point in the history
  • Loading branch information
pirj committed Dec 8, 2020
1 parent 657336e commit 3428f61
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/rspec/mocks/verifying_doubles/naming_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3428f61

Please sign in to comment.