Skip to content

Commit

Permalink
Use different names for autoload constants in specs for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Jun 21, 2019
1 parent e5e811e commit 3b2d11a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/ruby/core/module/autoload_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@

ruby_version_is "2.7" do
it "returns nil if an ancestor defined that autoload but recursion is disabled" do
ModuleSpecs::Autoload::Parent.autoload :AnotherAutoload, "another_autoload.rb"
ModuleSpecs::Autoload::Child.autoload?(:AnotherAutoload, false).should be_nil
ModuleSpecs::Autoload::Parent.autoload :InheritedAutoload, "inherited_autoload.rb"
ModuleSpecs::Autoload::Child.autoload?(:InheritedAutoload, false).should be_nil
end

it "returns the name of the file that will be loaded if recursion is disabled but the autoload is defined on the classs itself" do
ModuleSpecs::Autoload::Child.autoload :AnotherAutoload, "another_autoload.rb"
ModuleSpecs::Autoload::Child.autoload?(:AnotherAutoload, false).should == "another_autoload.rb"
ModuleSpecs::Autoload::Child.autoload :ChildAutoload, "child_autoload.rb"
ModuleSpecs::Autoload::Child.autoload?(:ChildAutoload, false).should == "child_autoload.rb"
end
end
end
Expand Down

0 comments on commit 3b2d11a

Please sign in to comment.