1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #27195 from y-yagi/use_public_module_include

use public Module#include instead of send :include
This commit is contained in:
Santiago Pastorino 2016-11-27 23:31:13 -03:00 committed by GitHub
commit 45edcde78f
3 changed files with 3 additions and 3 deletions

View file

@ -145,7 +145,7 @@ class IntegrationTestTest < ActiveSupport::TestCase
name.to_s == "foo" ? "pass" : super
end
end
@test.class.superclass.__send__(:include, mixin)
@test.class.superclass.include(mixin)
begin
assert_equal "pass", @test.foo
ensure

View file

@ -3,7 +3,7 @@ require "cases/helper"
class TestFixturesTest < ActiveRecord::TestCase
setup do
@klass = Class.new
@klass.send(:include, ActiveRecord::TestFixtures)
@klass.include(ActiveRecord::TestFixtures)
end
def test_deprecated_use_transactional_fixtures=

View file

@ -76,7 +76,7 @@ class ConcernTest < ActiveSupport::TestCase
end
def test_class_methods_are_extended_only_on_expected_objects
::Object.__send__(:include, Qux)
::Object.include(Qux)
Object.extend(Qux::ClassMethods)
# module needs to be created after Qux is included in Object or bug won't
# be triggered