Merge pull request #1197 from sgmap/replace_deprecated_stubs

Replace old stub with new allow syntax
This commit is contained in:
gregoirenovel 2018-01-09 14:48:06 +01:00 committed by GitHub
commit 52df5d998a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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