Merge pull request #1197 from sgmap/replace_deprecated_stubs
Replace old stub with new allow syntax
This commit is contained in:
commit
52df5d998a
3 changed files with 3 additions and 3 deletions
|
@ -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 }
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue