From f3d4767d0c78daf315e6b653bed3a3a3ee308072 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Mon, 13 Jul 2015 18:33:50 -0400 Subject: Rename `notice_added_references` to `create_new_cross_references!` --- spec/models/concerns/mentionable_spec.rb | 10 +++++----- spec/support/mentionable_shared_examples.rb | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'spec') diff --git a/spec/models/concerns/mentionable_spec.rb b/spec/models/concerns/mentionable_spec.rb index 82e8a83bb3d..2d6fe003215 100644 --- a/spec/models/concerns/mentionable_spec.rb +++ b/spec/models/concerns/mentionable_spec.rb @@ -29,7 +29,7 @@ describe Issue, "Mentionable" do end end - describe '#notice_added_references' do + describe '#create_new_cross_references!' do let(:project) { create(:project) } let(:issues) { create_list(:issue, 2, project: project) } @@ -40,7 +40,7 @@ describe Issue, "Mentionable" do expect(SystemNoteService).not_to receive(:cross_reference) issue.description = 'New description' - issue.notice_added_references + issue.create_new_cross_references! end it 'notifies new references' do @@ -49,7 +49,7 @@ describe Issue, "Mentionable" do expect(SystemNoteService).to receive(:cross_reference).with(issues[1], any_args) issue.description = issues[1].to_reference - issue.notice_added_references + issue.create_new_cross_references! end end @@ -60,7 +60,7 @@ describe Issue, "Mentionable" do expect(SystemNoteService).not_to receive(:cross_reference) issue.update_attributes(description: 'New description') - issue.notice_added_references + issue.create_new_cross_references! end it 'notifies new references' do @@ -69,7 +69,7 @@ describe Issue, "Mentionable" do expect(SystemNoteService).to receive(:cross_reference).with(issues[1], any_args) issue.update_attributes(description: issues[1].to_reference) - issue.notice_added_references + issue.create_new_cross_references! end end diff --git a/spec/support/mentionable_shared_examples.rb b/spec/support/mentionable_shared_examples.rb index a2a0b6905f9..f0717e61781 100644 --- a/spec/support/mentionable_shared_examples.rb +++ b/spec/support/mentionable_shared_examples.rb @@ -143,6 +143,6 @@ shared_examples 'an editable mentionable' do end set_mentionable_text.call(new_text) - subject.notice_added_references(project, author) + subject.create_new_cross_references!(project, author) end end -- cgit v1.2.1