summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-09-11 00:56:14 +0800
committerLin Jen-Shin <godfat@godfat.org>2018-09-11 18:45:49 +0800
commit1cee6b3c7212835ad251a489a867ec8ca07c2f33 (patch)
treedbc591d7e0046fcf54aa1c5050abe2f085ba69b9
parent3acec5328e9572c36b08eccf81c392d52cb908c9 (diff)
downloadgitlab-ce-1cee6b3c7212835ad251a489a867ec8ca07c2f33.tar.gz
Add a test for triggering MultiplePrependedBlocks
-rw-r--r--spec/lib/gitlab/patch/prependable_spec.rb19
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