another object finder

This commit is contained in:
John Bintz 2012-12-06 08:11:14 -05:00
parent 06e59c26fd
commit d0c101f032
1 changed files with 6 additions and 1 deletions

View File

@ -85,8 +85,13 @@ def dont_find(search)
end end
def dont_find_object(object) def dont_find_object(object)
case object
when Class
dont_find("[data-type='#{object}']")
else
dont_find("[data-id='#{object.id}']") dont_find("[data-id='#{object.id}']")
end end
end
def find_object(object) def find_object(object)
find(object_matcher(object)) find(object_matcher(object))