Fix a spec failure dependent on load order

We were incorrectly stubbing `Issues::MoveService#execute`. This only
caused a failure when another spec caused it to be autoloaded --
`spec/controllers/projects/issues_controller_spec.rb` in this case.
This commit is contained in:
Robert Speicher 2017-09-01 18:13:00 -04:00
parent f0777fbb28
commit 7cc19cd5ab
1 changed files with 1 additions and 1 deletions

View File

@ -519,7 +519,7 @@ describe Issues::UpdateService, :mailer do
end
it 'calls the move service with the proper issue and project' do
move_stub = class_double("Issues::MoveService").as_stubbed_const
move_stub = instance_double(Issues::MoveService)
allow(Issues::MoveService).to receive(:new).and_return(move_stub)
allow(move_stub).to receive(:execute).with(issue, target_project).and_return(issue)