diff options
author | Rémy Coutable <remy@rymai.me> | 2017-01-24 17:07:56 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-01-25 12:14:02 +0100 |
commit | 68e94450a06e043ecf58ede565060f41b61043f9 (patch) | |
tree | 30ce6ad74036b92e000aee5ef0a71a7dfb8526f1 /spec/lib/gitlab/view | |
parent | 0ac65b6cc31962c293782a1f3e8d6d41922569c8 (diff) | |
download | gitlab-ce-68e94450a06e043ecf58ede565060f41b61043f9.tar.gz |
Raise Gitlab::View::Presenter::CannotOverrideMethodError if presentee already respond to method26943-fix-user-in-build-presenter
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/lib/gitlab/view')
-rw-r--r-- | spec/lib/gitlab/view/presenter/delegated_spec.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/lib/gitlab/view/presenter/delegated_spec.rb b/spec/lib/gitlab/view/presenter/delegated_spec.rb index 8390188bfdc..e9d4af54389 100644 --- a/spec/lib/gitlab/view/presenter/delegated_spec.rb +++ b/spec/lib/gitlab/view/presenter/delegated_spec.rb @@ -17,10 +17,9 @@ describe Gitlab::View::Presenter::Delegated do expect(presenter.current_user).to eq('Jane Doe') end - it 'does not override the presentee attributes' do - presenter = presenter_class.new(project, user: 'Jane Doe') - - expect(presenter.user).to eq('John Doe') + it 'raise an error if the presentee already respond to method' do + expect { presenter_class.new(project, user: 'Jane Doe') }. + to raise_error Gitlab::View::Presenter::CannotOverrideMethodError end end |