small updates
This commit is contained in:
parent
e83f5c8492
commit
3b6863a124
|
@ -12,6 +12,8 @@ module SemanticRailsViewHelpers
|
||||||
@options[:class] ||= ''
|
@options[:class] ||= ''
|
||||||
@options[:class] << ' attributes table'
|
@options[:class] << ' attributes table'
|
||||||
|
|
||||||
|
@options.merge!(@context.send(:semantic_model_data, @object))
|
||||||
|
|
||||||
@context.content_tag(:table, @options) do
|
@context.content_tag(:table, @options) do
|
||||||
@context.capture(self, &@block)
|
@context.capture(self, &@block)
|
||||||
end
|
end
|
||||||
|
|
|
@ -178,15 +178,18 @@ def within_any(search, &block)
|
||||||
|
|
||||||
raise Capybara::ElementNotFound if nodes.empty?
|
raise Capybara::ElementNotFound if nodes.empty?
|
||||||
|
|
||||||
|
exceptions = []
|
||||||
|
|
||||||
nodes.each_with_index do |node, index|
|
nodes.each_with_index do |node, index|
|
||||||
begin
|
begin
|
||||||
within("#{search}:nth-child(#{index + 1})", &block)
|
within("#{search}:nth-child(#{index + 1})", &block)
|
||||||
return true
|
return true
|
||||||
rescue RSpec::Expectations::ExpectationNotMetError, Capybara::ElementNotFound
|
rescue RSpec::Expectations::ExpectationNotMetError, Capybara::ElementNotFound => e
|
||||||
|
exceptions << e
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
false
|
raise exceptions.last
|
||||||
end
|
end
|
||||||
|
|
||||||
def refind_object(object)
|
def refind_object(object)
|
||||||
|
|
Loading…
Reference in New Issue