diff options
author | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2015-02-12 21:17:35 +0300 |
---|---|---|
committer | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2015-02-12 21:17:35 +0300 |
commit | 0c4a70a306b871899bf87ce4673918abfee4d95f (patch) | |
tree | c7a702fb511209ffe0eceba245d1ffea71dce1aa /spec/lib/gitlab/closing_issue_extractor_spec.rb | |
parent | de1c450abd6b367390a1295cac402344f500d41d (diff) |
Updated rspec to rspec 3.x syntax
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
Diffstat (limited to 'spec/lib/gitlab/closing_issue_extractor_spec.rb')
-rw-r--r-- | spec/lib/gitlab/closing_issue_extractor_spec.rb | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/spec/lib/gitlab/closing_issue_extractor_spec.rb b/spec/lib/gitlab/closing_issue_extractor_spec.rb index 0a1f3fa351d..c96ee78e5fd 100644 --- a/spec/lib/gitlab/closing_issue_extractor_spec.rb +++ b/spec/lib/gitlab/closing_issue_extractor_spec.rb @@ -9,122 +9,122 @@ describe Gitlab::ClosingIssueExtractor do context 'with a single reference' do it do message = "Awesome commit (Closes ##{iid1})" - subject.closed_by_message_in_project(message, project).should == [issue] + expect(subject.closed_by_message_in_project(message, project)).to eq([issue]) end it do message = "Awesome commit (closes ##{iid1})" - subject.closed_by_message_in_project(message, project).should == [issue] + expect(subject.closed_by_message_in_project(message, project)).to eq([issue]) end it do message = "Closed ##{iid1}" - subject.closed_by_message_in_project(message, project).should == [issue] + expect(subject.closed_by_message_in_project(message, project)).to eq([issue]) end it do message = "closed ##{iid1}" - subject.closed_by_message_in_project(message, project).should == [issue] + expect(subject.closed_by_message_in_project(message, project)).to eq([issue]) end it do message = "Closing ##{iid1}" - subject.closed_by_message_in_project(message, project).should == [issue] + expect(subject.closed_by_message_in_project(message, project)).to eq([issue]) end it do message = "closing ##{iid1}" - subject.closed_by_message_in_project(message, project).should == [issue] + expect(subject.closed_by_message_in_project(message, project)).to eq([issue]) end it do message = "Close ##{iid1}" - subject.closed_by_message_in_project(message, project).should == [issue] + expect(subject.closed_by_message_in_project(message, project)).to eq([issue]) end it do message = "close ##{iid1}" - subject.closed_by_message_in_project(message, project).should == [issue] + expect(subject.closed_by_message_in_project(message, project)).to eq([issue]) end it do message = "Awesome commit (Fixes ##{iid1})" - subject.closed_by_message_in_project(message, project).should == [issue] + expect(subject.closed_by_message_in_project(message, project)).to eq([issue]) end it do message = "Awesome commit (fixes ##{iid1})" - subject.closed_by_message_in_project(message, project).should == [issue] + expect(subject.closed_by_message_in_project(message, project)).to eq([issue]) end it do message = "Fixed ##{iid1}" - subject.closed_by_message_in_project(message, project).should == [issue] + expect(subject.closed_by_message_in_project(message, project)).to eq([issue]) end it do message = "fixed ##{iid1}" - subject.closed_by_message_in_project(message, project).should == [issue] + expect(subject.closed_by_message_in_project(message, project)).to eq([issue]) end it do message = "Fixing ##{iid1}" - subject.closed_by_message_in_project(message, project).should == [issue] + expect(subject.closed_by_message_in_project(message, project)).to eq([issue]) end it do message = "fixing ##{iid1}" - subject.closed_by_message_in_project(message, project).should == [issue] + expect(subject.closed_by_message_in_project(message, project)).to eq([issue]) end it do message = "Fix ##{iid1}" - subject.closed_by_message_in_project(message, project).should == [issue] + expect(subject.closed_by_message_in_project(message, project)).to eq([issue]) end it do message = "fix ##{iid1}" - subject.closed_by_message_in_project(message, project).should == [issue] + expect(subject.closed_by_message_in_project(message, project)).to eq([issue]) end it do message = "Awesome commit (Resolves ##{iid1})" - subject.closed_by_message_in_project(message, project).should == [issue] + expect(subject.closed_by_message_in_project(message, project)).to eq([issue]) end it do message = "Awesome commit (resolves ##{iid1})" - subject.closed_by_message_in_project(message, project).should == [issue] + expect(subject.closed_by_message_in_project(message, project)).to eq([issue]) end it do message = "Resolved ##{iid1}" - subject.closed_by_message_in_project(message, project).should == [issue] + expect(subject.closed_by_message_in_project(message, project)).to eq([issue]) end it do message = "resolved ##{iid1}" - subject.closed_by_message_in_project(message, project).should == [issue] + expect(subject.closed_by_message_in_project(message, project)).to eq([issue]) end it do message = "Resolving ##{iid1}" - subject.closed_by_message_in_project(message, project).should == [issue] + expect(subject.closed_by_message_in_project(message, project)).to eq([issue]) end it do message = "resolving ##{iid1}" - subject.closed_by_message_in_project(message, project).should == [issue] + expect(subject.closed_by_message_in_project(message, project)).to eq([issue]) end it do message = "Resolve ##{iid1}" - subject.closed_by_message_in_project(message, project).should == [issue] + expect(subject.closed_by_message_in_project(message, project)).to eq([issue]) end it do message = "resolve ##{iid1}" - subject.closed_by_message_in_project(message, project).should == [issue] + expect(subject.closed_by_message_in_project(message, project)).to eq([issue]) end end @@ -137,37 +137,37 @@ describe Gitlab::ClosingIssueExtractor do it 'fetches issues in single line message' do message = "Closes ##{iid1} and fix ##{iid2}" - subject.closed_by_message_in_project(message, project). - should == [issue, other_issue] + expect(subject.closed_by_message_in_project(message, project)). + to eq([issue, other_issue]) end it 'fetches comma-separated issues references in single line message' do message = "Closes ##{iid1}, closes ##{iid2}" - subject.closed_by_message_in_project(message, project). - should == [issue, other_issue] + expect(subject.closed_by_message_in_project(message, project)). + to eq([issue, other_issue]) end it 'fetches comma-separated issues numbers in single line message' do message = "Closes ##{iid1}, ##{iid2} and ##{iid3}" - subject.closed_by_message_in_project(message, project). - should == [issue, other_issue, third_issue] + expect(subject.closed_by_message_in_project(message, project)). + to eq([issue, other_issue, third_issue]) end it 'fetches issues in multi-line message' do message = "Awesome commit (closes ##{iid1})\nAlso fixes ##{iid2}" - subject.closed_by_message_in_project(message, project). - should == [issue, other_issue] + expect(subject.closed_by_message_in_project(message, project)). + to eq([issue, other_issue]) end it 'fetches issues in hybrid message' do message = "Awesome commit (closes ##{iid1})\n"\ "Also fixing issues ##{iid2}, ##{iid3} and #4" - subject.closed_by_message_in_project(message, project). - should == [issue, other_issue, third_issue] + expect(subject.closed_by_message_in_project(message, project)). + to eq([issue, other_issue, third_issue]) end end end |