Commit 580dfe5a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Replace assign with stub for default_branch

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 9d14c513
...@@ -116,13 +116,13 @@ describe MergeRequest do ...@@ -116,13 +116,13 @@ describe MergeRequest do
end end
it 'accesses the set of issues that will be closed on acceptance' do it 'accesses the set of issues that will be closed on acceptance' do
subject.project.default_branch = subject.target_branch subject.project.stub(default_branch: subject.target_branch)
subject.closes_issues.should == [issue0, issue1].sort_by(&:id) subject.closes_issues.should == [issue0, issue1].sort_by(&:id)
end end
it 'only lists issues as to be closed if it targets the default branch' do it 'only lists issues as to be closed if it targets the default branch' do
subject.project.default_branch = 'master' subject.project.stub(default_branch: 'master')
subject.target_branch = 'something-else' subject.target_branch = 'something-else'
subject.closes_issues.should be_empty subject.closes_issues.should be_empty
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment