From d0c101f03208dd5f4c0f3b527b42463ca827eab5 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Thu, 6 Dec 2012 08:11:14 -0500 Subject: [PATCH] another object finder --- lib/semantic_rails_view_helpers/capybara.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/semantic_rails_view_helpers/capybara.rb b/lib/semantic_rails_view_helpers/capybara.rb index 9a623dd..c2507ed 100644 --- a/lib/semantic_rails_view_helpers/capybara.rb +++ b/lib/semantic_rails_view_helpers/capybara.rb @@ -85,7 +85,12 @@ def dont_find(search) end def dont_find_object(object) - dont_find("[data-id='#{object.id}']") + case object + when Class + dont_find("[data-type='#{object}']") + else + dont_find("[data-id='#{object.id}']") + end end def find_object(object)