From 401393b6561adc1ce7101945163c9601257c057a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 21 Nov 2011 22:07:24 +0000 Subject: Deprecate InstanceMethods namespace handling in ActiveSupport::Concern. This avoids the unnecessary "yo dawg, I heard you like include, so I put a module that includes your module when it is included" approach when building extensions. --- activesupport/test/concern_test.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'activesupport/test') diff --git a/activesupport/test/concern_test.rb b/activesupport/test/concern_test.rb index 4cbe56a2d2..0b0920ee03 100644 --- a/activesupport/test/concern_test.rb +++ b/activesupport/test/concern_test.rb @@ -19,9 +19,6 @@ class ConcernTest < Test::Unit::TestCase end end - module InstanceMethods - end - included do self.included_ran = true end @@ -74,7 +71,7 @@ class ConcernTest < Test::Unit::TestCase def test_instance_methods_are_included @klass.send(:include, Baz) assert_equal "baz", @klass.new.baz - assert @klass.included_modules.include?(ConcernTest::Baz::InstanceMethods) + assert @klass.included_modules.include?(ConcernTest::Baz) end def test_included_block_is_ran @@ -92,6 +89,6 @@ class ConcernTest < Test::Unit::TestCase def test_dependencies_with_multiple_modules @klass.send(:include, Foo) - assert_equal [ConcernTest::Foo, ConcernTest::Bar, ConcernTest::Baz::InstanceMethods, ConcernTest::Baz], @klass.included_modules[0..3] + assert_equal [ConcernTest::Foo, ConcernTest::Bar, ConcernTest::Baz], @klass.included_modules[0..2] end end -- cgit v1.2.3