Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix devise specs for :devise_scope compatibility #2311

Merged
merged 1 commit into from
May 28, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spec/integration/rails_admin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down