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:
yuuji.yaginuma 2018-11-22 17:20:51 +09:00
parent 47ab6b36d7
commit f8bd01cdd9
1 changed files with 2 additions and 2 deletions

View File

@ -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")