Replace old stub with new allow syntax

This commit is contained in:
Frederic Merizen 2018-01-09 14:37:39 +01:00
parent ce8961a2dc
commit 8e9d360260
3 changed files with 3 additions and 3 deletions

View file

@ -8,7 +8,7 @@ describe Administrations::OmniauthCallbacksController, type: :controller do
describe 'POST #github' do
let(:params) { { "info" => { "email" => email } } }
before do
controller.stub(:sign_in).and_return true
allow(controller).to receive(:sign_in).and_return true
@request.env["omniauth.auth"] = params
end
subject { post :github }

View file

@ -7,7 +7,7 @@ describe 'new_gestionnaire/dossiers/print.html.haml', type: :view do
before do
assign(:dossier, dossier)
view.stub(:current_gestionnaire).and_return(current_gestionnaire)
allow(view).to receive(:current_gestionnaire).and_return(current_gestionnaire)
render
end

View file

@ -8,7 +8,7 @@ describe 'new_gestionnaire/dossiers/show.html.haml', type: :view do
before do
assign(:dossier, dossier)
view.stub(:current_gestionnaire).and_return(current_gestionnaire)
allow(view).to receive(:current_gestionnaire).and_return(current_gestionnaire)
render
end