mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix ruby warnings
This fixes following warnings: ``` test/dependencies_test.rb:287: warning: possibly useless use of :: in void context test/dependencies_test.rb:300: warning: possibly useless use of a constant in void context ```
This commit is contained in:
parent
47ab6b36d7
commit
f8bd01cdd9
1 changed files with 2 additions and 2 deletions
|
@ -284,7 +284,7 @@ class DependenciesTest < ActiveSupport::TestCase
|
|||
|
||||
def test_module_with_nested_class_requiring_lib_class
|
||||
with_autoloading_fixtures do
|
||||
ModuleFolder::NestedWithRequire
|
||||
_ = ModuleFolder::NestedWithRequire # assignment to silence parse-time warning "possibly useless use of :: in void context"
|
||||
|
||||
assert defined?(ModuleFolder::LibClass)
|
||||
assert_not ActiveSupport::Dependencies.autoloaded_constants.include?("ModuleFolder::LibClass")
|
||||
|
@ -297,7 +297,7 @@ class DependenciesTest < ActiveSupport::TestCase
|
|||
|
||||
def test_module_with_nested_class_and_parent_requiring_lib_class
|
||||
with_autoloading_fixtures do
|
||||
NestedWithRequireParent
|
||||
_ = NestedWithRequireParent # assignment to silence parse-time warning "possibly useless use of a constant in void context"
|
||||
|
||||
assert defined?(ModuleFolder::LibClass)
|
||||
assert_not ActiveSupport::Dependencies.autoloaded_constants.include?("ModuleFolder::LibClass")
|
||||
|
|
Loading…
Reference in a new issue