diff options
author | Takuya Noguchi <takninnovationresearch@gmail.com> | 2018-01-27 14:35:53 +0900 |
---|---|---|
committer | Takuya Noguchi <takninnovationresearch@gmail.com> | 2018-02-01 02:06:07 +0900 |
commit | 2b6307f6ad9d09156c42befe4babbfea40dad052 (patch) | |
tree | 2a05eb3e7a481ed803ea62a2d4e7667baff44375 /spec/services | |
parent | 08e013431acb5238b4806260c4b9c304837097a3 (diff) | |
download | gitlab-ce-2b6307f6ad9d09156c42befe4babbfea40dad052.tar.gz |
Enable RuboCop Style/RegexpLiteral
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb | 2 | ||||
-rw-r--r-- | spec/services/system_note_service_spec.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb b/spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb index f17db70faf6..240aa638f79 100644 --- a/spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb +++ b/spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb @@ -43,7 +43,7 @@ describe MergeRequests::MergeWhenPipelineSucceedsService do it 'creates a system note' do note = merge_request.notes.last - expect(note.note).to match /enabled an automatic merge when the pipeline for (\w+\/\w+@)?\h{8}/ + expect(note.note).to match %r{enabled an automatic merge when the pipeline for (\w+/\w+@)?\h{8}} end end diff --git a/spec/services/system_note_service_spec.rb b/spec/services/system_note_service_spec.rb index ab3a257f36f..ab3aa18cf4e 100644 --- a/spec/services/system_note_service_spec.rb +++ b/spec/services/system_note_service_spec.rb @@ -308,7 +308,7 @@ describe SystemNoteService do end it "posts the 'merge when pipeline succeeds' system note" do - expect(subject.note).to match(/enabled an automatic merge when the pipeline for (\w+\/\w+@)?\h{40} succeeds/) + expect(subject.note).to match(%r{enabled an automatic merge when the pipeline for (\w+/\w+@)?\h{40} succeeds}) end end @@ -695,7 +695,7 @@ describe SystemNoteService do commit = double(title: '<pre>This is a test</pre>', short_id: '12345678') escaped = '<pre>This is a test</pre>' - expect(described_class.new_commit_summary([commit])).to all(match(%r[- #{escaped}])) + expect(described_class.new_commit_summary([commit])).to all(match(/- #{escaped}/)) end end |