From 4dffc6c84f281e766f26ebad8c3ba5ae134cd831 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Fri, 8 Feb 2013 08:08:40 -0500 Subject: [PATCH] have dont_find methods check twice, once now, once after Capybara.default_wait_time --- lib/semantic_rails_view_helpers/capybara.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/semantic_rails_view_helpers/capybara.rb b/lib/semantic_rails_view_helpers/capybara.rb index 3526179..93fbad3 100644 --- a/lib/semantic_rails_view_helpers/capybara.rb +++ b/lib/semantic_rails_view_helpers/capybara.rb @@ -77,6 +77,10 @@ end def dont_find_wrap(search) yield + sleep Capybara.default_wait_time + + yield + raise Capybara::ElementFound.new(search) rescue Capybara::ElementNotFound true