From 73a05381fce649d80cf7baccc49416de688b6914 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Wed, 27 May 2015 21:00:01 +0200 Subject: [PATCH] Fix devise specs for :devise_scope compatibility --- spec/integration/rails_admin_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/integration/rails_admin_spec.rb b/spec/integration/rails_admin_spec.rb index dcc8f522fb..ce8c6d883f 100644 --- a/spec/integration/rails_admin_spec.rb +++ b/spec/integration/rails_admin_spec.rb @@ -127,13 +127,13 @@ it "does not show Gravatar when user doesn't have email method" do allow_any_instance_of(User).to receive(:respond_to?).and_return(true) allow_any_instance_of(User).to receive(:respond_to?).with(:email).and_return(false) + allow_any_instance_of(User).to receive(:respond_to?).with(:devise_scope).and_return(false) visit dashboard_path is_expected.not_to have_selector('ul.nav.pull-right li img') end it 'does not cause error when email is nil' do - allow_any_instance_of(User).to receive(:respond_to?).and_return(true) - allow_any_instance_of(User).to receive(:respond_to?).with(:email).and_return(nil) + allow_any_instance_of(User).to receive(:email).and_return(nil) visit dashboard_path is_expected.to have_selector('body.rails_admin') end