small updates

This commit is contained in:
John Bintz 2013-05-25 14:04:51 -04:00
parent e83f5c8492
commit 3b6863a124
2 changed files with 8 additions and 3 deletions

View File

@ -12,6 +12,8 @@ module SemanticRailsViewHelpers
@options[:class] ||= ''
@options[:class] << ' attributes table'
@options.merge!(@context.send(:semantic_model_data, @object))
@context.content_tag(:table, @options) do
@context.capture(self, &@block)
end

View File

@ -24,7 +24,7 @@ def find_first(search)
omatch = Capybara.match
Capybara.match = :first
result = find(search)
Capybara.match = omatch
Capybara.match = omatch
result
end
@ -178,15 +178,18 @@ def within_any(search, &block)
raise Capybara::ElementNotFound if nodes.empty?
exceptions = []
nodes.each_with_index do |node, index|
begin
within("#{search}:nth-child(#{index + 1})", &block)
return true
rescue RSpec::Expectations::ExpectationNotMetError, Capybara::ElementNotFound
rescue RSpec::Expectations::ExpectationNotMetError, Capybara::ElementNotFound => e
exceptions << e
end
end
false
raise exceptions.last
end
def refind_object(object)