# spec_helper.rb # use default_max_wait_time, default_wait_time is deprecated Capybara.default_max_wait_time = 5 # the feature test will wait up to 5 seconds expect(page).to have_no_selector(:css, "p a#doesnotexist")