Replace assign with stub for default_branch

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2013-11-06 19:13:45 +02:00
parent 9d14c5137a
commit 580dfe5af9
No known key found for this signature in database
GPG key ID: 2CEAFD2671262EC2

View file

@ -116,13 +116,13 @@ describe MergeRequest do
end
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)
end
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.closes_issues.should be_empty