зеркало из https://github.com/github/ruby.git
Refinement#include and Refinement#prepend have been deprecated
This commit is contained in:
Родитель
4446942f1a
Коммит
9f4f3bd1cc
|
@ -298,6 +298,7 @@ describe "Module#refine" do
|
|||
result.should == "foo from IncludeMeLater"
|
||||
end
|
||||
|
||||
ruby_version_is ""..."3.1" do
|
||||
it "looks in prepended modules from the refinement first" do
|
||||
refined_class = ModuleSpecs.build_refined_class
|
||||
|
||||
|
@ -356,6 +357,7 @@ describe "Module#refine" do
|
|||
|
||||
result.should == "foo from included module"
|
||||
end
|
||||
end
|
||||
|
||||
it "looks in the class then" do
|
||||
refined_class = ModuleSpecs.build_refined_class
|
||||
|
@ -704,6 +706,7 @@ describe "Module#refine" do
|
|||
result.should == "foo"
|
||||
end
|
||||
|
||||
ruby_version_is ""..."3.1" do
|
||||
it "looks in the refined class from included module" do
|
||||
refined_class = ModuleSpecs.build_refined_class(for_super: true)
|
||||
|
||||
|
@ -754,6 +757,7 @@ describe "Module#refine" do
|
|||
|
||||
result.should == [:A, :C]
|
||||
end
|
||||
end
|
||||
|
||||
# super in a method of a refinement invokes the method in the refined
|
||||
# class even if there is another refinement which has been activated
|
||||
|
@ -816,6 +820,7 @@ describe "Module#refine" do
|
|||
end
|
||||
end
|
||||
|
||||
ruby_version_is ""..."3.1" do
|
||||
it "does't have access to active refinements for C from included module" do
|
||||
refined_class = ModuleSpecs.build_refined_class
|
||||
|
||||
|
@ -987,6 +992,7 @@ describe "Module#refine" do
|
|||
result.should == [:A, :LOCAL, :C]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
it 'and alias aliases a method within a refinement module, but not outside it' do
|
||||
Module.new do
|
||||
|
|
Загрузка…
Ссылка в новой задаче