Add and apply RSpec/BeNil rubocop rule

This rule was added in rubocop-rspec 2.9.0.

We were using `be_nil` 50% of the time, and `be nil` the rest of the
time. No strong preference for either one, but IMHO we don't lose
anything be being consistent.
This commit is contained in:
Javi Martín
2023-08-29 19:03:48 +02:00
parent 4fc4afa3a7
commit 6268ae9274
16 changed files with 40 additions and 36 deletions

View File

@@ -8,7 +8,7 @@ describe Management::SessionsController do
expect(response).to redirect_to "/"
expect(flash[:alert]).to eq "You do not have permission to access this page."
expect(session[:manager]).to be_nil
expect(session[:manager]).to be nil
end
it "redirects to management root path if authorized manager with right credentials" do
@@ -46,7 +46,7 @@ describe Management::SessionsController do
expect(response).to redirect_to "/"
expect(flash[:alert]).to eq "You do not have permission to access this page."
expect(session[:manager]).to be_nil
expect(session[:manager]).to be nil
end
end
@@ -58,9 +58,9 @@ describe Management::SessionsController do
delete :destroy
expect(session[:manager]).to be_nil
expect(session[:document_type]).to be_nil
expect(session[:document_number]).to be_nil
expect(session[:manager]).to be nil
expect(session[:document_type]).to be nil
expect(session[:document_number]).to be nil
expect(response).to be_redirect
end
end