diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-09-10 19:56:14 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-09-11 13:45:49 +0300 |
commit | 1cee6b3c7212835ad251a489a867ec8ca07c2f33 (patch) | |
tree | dbc591d7e0046fcf54aa1c5050abe2f085ba69b9 /spec/lib/gitlab/patch | |
parent | 3acec5328e9572c36b08eccf81c392d52cb908c9 (diff) |
Add a test for triggering MultiplePrependedBlocks
Diffstat (limited to 'spec/lib/gitlab/patch')
-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 |