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:
@@ -116,7 +116,7 @@ describe "Home" do
|
||||
|
||||
visit root_path
|
||||
expect(page).to have_xpath(ie_alert_box_xpath)
|
||||
expect(page.driver.request.cookies["ie_alert_closed"]).to be_nil
|
||||
expect(page.driver.request.cookies["ie_alert_closed"]).to be nil
|
||||
|
||||
# faking close button, since a normal find and click
|
||||
# will not work as the element is inside a HTML conditional comment
|
||||
@@ -130,7 +130,7 @@ describe "Home" do
|
||||
scenario "non-IE visitors are not bothered with IE alerts", :page_driver do
|
||||
visit root_path
|
||||
expect(page).not_to have_xpath(ie_alert_box_xpath)
|
||||
expect(page.driver.request.cookies["ie_alert_closed"]).to be_nil
|
||||
expect(page.driver.request.cookies["ie_alert_closed"]).to be nil
|
||||
end
|
||||
|
||||
def ie_alert_box_xpath
|
||||
|
||||
Reference in New Issue
Block a user