Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4ea0a82b
Commit
4ea0a82b
authored
Oct 01, 2019
by
Arturo Herrero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace allow_any_instance_of with expect_next_instance_of
parent
a7f89757
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
spec/services/merge_requests/post_merge_service_spec.rb
spec/services/merge_requests/post_merge_service_spec.rb
+3
-2
No files found.
spec/services/merge_requests/post_merge_service_spec.rb
View file @
4ea0a82b
...
@@ -56,8 +56,9 @@ describe MergeRequests::PostMergeService do
...
@@ -56,8 +56,9 @@ describe MergeRequests::PostMergeService do
issue
=
create
(
:issue
,
project:
project
)
issue
=
create
(
:issue
,
project:
project
)
allow
(
merge_request
).
to
receive
(
:visible_closing_issues_for
).
and_return
([
issue
])
allow
(
merge_request
).
to
receive
(
:visible_closing_issues_for
).
and_return
([
issue
])
allow_any_instance_of
(
Issues
::
CloseService
).
to
receive
(
:execute
)
expect_next_instance_of
(
Issues
::
CloseService
)
do
|
service
|
.
with
(
issue
,
commit:
merge_request
).
and_raise
(
RuntimeError
)
allow
(
service
).
to
receive
(
:execute
).
with
(
issue
,
commit:
merge_request
).
and_raise
(
RuntimeError
)
end
expect
{
described_class
.
new
(
project
,
user
).
execute
(
merge_request
)
}.
to
raise_error
(
RuntimeError
)
expect
{
described_class
.
new
(
project
,
user
).
execute
(
merge_request
)
}.
to
raise_error
(
RuntimeError
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment