diff options
author | Mark Chao <mchao@gitlab.com> | 2018-07-19 10:43:17 +0800 |
---|---|---|
committer | Mark Chao <mchao@gitlab.com> | 2018-08-07 16:53:44 +0800 |
commit | 35e029009d3d4cc19a4645538e1f4b19e69c8a51 (patch) | |
tree | 708605d6d84a50089e95a999a599a6ff06678613 /spec/services/notes | |
parent | bd6f1ceb27a9179f91c3480b532210c26c82d39d (diff) | |
download | gitlab-ce-35e029009d3d4cc19a4645538e1f4b19e69c8a51.tar.gz |
Convert use of any_instance as it does not work with prepend
Diffstat (limited to 'spec/services/notes')
-rw-r--r-- | spec/services/notes/create_service_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/services/notes/create_service_spec.rb b/spec/services/notes/create_service_spec.rb index 0fd37c95e42..b1290fd0d47 100644 --- a/spec/services/notes/create_service_spec.rb +++ b/spec/services/notes/create_service_spec.rb @@ -145,7 +145,9 @@ describe Notes::CreateService do let(:note_text) { %(HELLO\n/close\n/assign @#{user.username}\nWORLD) } it 'saves the note and does not alter the note text' do - expect_any_instance_of(Issues::UpdateService).to receive(:execute).and_call_original + service = double(:service) + allow(Issues::UpdateService).to receive(:new).and_return(service) + expect(service).to receive(:execute) note = described_class.new(project, user, opts.merge(note: note_text)).execute |