diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-14 18:08:04 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-14 18:08:04 +0300 |
commit | 8c4225a66b12683bcf1bba9bb9328fcf65395b6d (patch) | |
tree | d3b583abd26fcbbcbf0db828aee2b940414e1649 /spec/mailers | |
parent | 075c890053f626018ba680e4da21a93743acb244 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/mailers')
-rw-r--r-- | spec/mailers/notify_spec.rb | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index bae92b78a24..684fe9bb9cf 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -649,16 +649,20 @@ RSpec.describe Notify do end context 'the model has no namespace' do - class TopLevelThing - include Referable - include Noteable + before do + stub_const('TopLevelThing', Class.new) - def to_reference(*_args) - 'tlt-ref' - end + TopLevelThing.class_eval do + include Referable + include Noteable - def id - 'tlt-id' + def to_reference(*_args) + 'tlt-ref' + end + + def id + 'tlt-id' + end end end @@ -672,8 +676,10 @@ RSpec.describe Notify do end context 'the model has a namespace' do - module Namespaced - class Thing + before do + stub_const('Namespaced::Thing', Class.new) + + Namespaced::Thing.class_eval do include Referable include Noteable |