diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-05-16 14:06:00 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-05-16 14:06:00 -0700 |
commit | 8f2b1a12dc10c6879afcdb6bc89ab6413b163e0c (patch) | |
tree | 5131796696a75e406fce2461e2bd8dabf5c26bc8 /activesupport/test | |
parent | 9fef7c8dc9e2880932d676ee663adc0f053bd089 (diff) | |
parent | 2d7a86e17947e359cb65653b987c666b2d7e8efb (diff) | |
download | rails-8f2b1a12dc10c6879afcdb6bc89ab6413b163e0c.tar.gz rails-8f2b1a12dc10c6879afcdb6bc89ab6413b163e0c.tar.bz2 rails-8f2b1a12dc10c6879afcdb6bc89ab6413b163e0c.zip |
Merge pull request #10652 from md5/concern-multiple-included
Raise an error when multiple included blocks are defined for a Concern
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/concern_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/activesupport/test/concern_test.rb b/activesupport/test/concern_test.rb index 912ce30c29..8e2c298fc6 100644 --- a/activesupport/test/concern_test.rb +++ b/activesupport/test/concern_test.rb @@ -91,4 +91,18 @@ class ConcernTest < ActiveSupport::TestCase @klass.send(:include, Foo) assert_equal [ConcernTest::Foo, ConcernTest::Bar, ConcernTest::Baz], @klass.included_modules[0..2] end + + def test_raise_on_multiple_included_calls + assert_raises(ActiveSupport::Concern::MultipleIncludedBlocks) do + Module.new do + extend ActiveSupport::Concern + + included do + end + + included do + end + end + end + end end |