From 60992cf1fb81b5d365abd75e21bf27adbe4efbde Mon Sep 17 00:00:00 2001 From: John Bintz Date: Sat, 29 Dec 2012 15:31:55 -0500 Subject: [PATCH] add link finder --- 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 050eee5..2120cf4 100644 --- a/lib/semantic_rails_view_helpers/capybara.rb +++ b/lib/semantic_rails_view_helpers/capybara.rb @@ -137,3 +137,7 @@ end def refind_object(object) object.class.find(object.id) end + +def find_semantic_link(link) + find("[data-link='#{link}']") +end