Commit 580dfe5af9c84feafaad1f870d53e2a49d27e0be
1 parent
9d14c513
Exists in
master
and in
4 other branches
Replace assign with stub for default_branch
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
spec/models/merge_request_spec.rb
| ... | ... | @@ -116,13 +116,13 @@ describe MergeRequest do |
| 116 | 116 | end |
| 117 | 117 | |
| 118 | 118 | it 'accesses the set of issues that will be closed on acceptance' do |
| 119 | - subject.project.default_branch = subject.target_branch | |
| 119 | + subject.project.stub(default_branch: subject.target_branch) | |
| 120 | 120 | |
| 121 | 121 | subject.closes_issues.should == [issue0, issue1].sort_by(&:id) |
| 122 | 122 | end |
| 123 | 123 | |
| 124 | 124 | it 'only lists issues as to be closed if it targets the default branch' do |
| 125 | - subject.project.default_branch = 'master' | |
| 125 | + subject.project.stub(default_branch: 'master') | |
| 126 | 126 | subject.target_branch = 'something-else' |
| 127 | 127 | |
| 128 | 128 | subject.closes_issues.should be_empty | ... | ... |