diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-09-11 00:56:14 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-09-11 18:45:49 +0800 |
commit | 1cee6b3c7212835ad251a489a867ec8ca07c2f33 (patch) | |
tree | dbc591d7e0046fcf54aa1c5050abe2f085ba69b9 | |
parent | 3acec5328e9572c36b08eccf81c392d52cb908c9 (diff) | |
download | gitlab-ce-1cee6b3c7212835ad251a489a867ec8ca07c2f33.tar.gz |
Add a test for triggering MultiplePrependedBlocks
-rw-r--r-- | spec/lib/gitlab/patch/prependable_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/lib/gitlab/patch/prependable_spec.rb b/spec/lib/gitlab/patch/prependable_spec.rb index ada6abcc796..51bacb18b33 100644 --- a/spec/lib/gitlab/patch/prependable_spec.rb +++ b/spec/lib/gitlab/patch/prependable_spec.rb @@ -213,4 +213,23 @@ describe Gitlab::Patch::Prependable do end end end + + context 'having two prepended blocks' do + subject do + Module.new do + extend ActiveSupport::Concern + + prepended do + end + + prepended do + end + end + end + + it "raises an error" do + expect { subject } + .to raise_error(described_class::MultiplePrependedBlocks) + end + end end |