From 0c4a70a306b871899bf87ce4673918abfee4d95f Mon Sep 17 00:00:00 2001 From: Jeroen van Baarsen Date: Thu, 12 Feb 2015 19:17:35 +0100 Subject: Updated rspec to rspec 3.x syntax Signed-off-by: Jeroen van Baarsen --- spec/services/merge_requests/close_service_spec.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'spec/services/merge_requests/close_service_spec.rb') diff --git a/spec/services/merge_requests/close_service_spec.rb b/spec/services/merge_requests/close_service_spec.rb index 5060a67bebf..b3cbfd4b5b8 100644 --- a/spec/services/merge_requests/close_service_spec.rb +++ b/spec/services/merge_requests/close_service_spec.rb @@ -16,13 +16,13 @@ describe MergeRequests::CloseService do let(:service) { MergeRequests::CloseService.new(project, user, {}) } before do - service.stub(:execute_hooks) + allow(service).to receive(:execute_hooks) @merge_request = service.execute(merge_request) end - it { @merge_request.should be_valid } - it { @merge_request.should be_closed } + it { expect(@merge_request).to be_valid } + it { expect(@merge_request).to be_closed } it 'should execute hooks with close action' do expect(service).to have_received(:execute_hooks). @@ -31,13 +31,13 @@ describe MergeRequests::CloseService do it 'should send email to user2 about assign of new merge_request' do email = ActionMailer::Base.deliveries.last - email.to.first.should == user2.email - email.subject.should include(merge_request.title) + expect(email.to.first).to eq(user2.email) + expect(email.subject).to include(merge_request.title) end it 'should create system note about merge_request reassign' do note = @merge_request.notes.last - note.note.should include 'Status changed to closed' + expect(note.note).to include 'Status changed to closed' end end end -- cgit v1.2.1